Changeset 214 for js/viewer-f0/js/NeuronDrawer.js
- Timestamp:
- 04/06/14 12:18:53 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
js/viewer-f0/js/NeuronDrawer.js
r208 r214 11 11 this._scale = 1; 12 12 this._min_scale = 0.1; 13 this._lineDebug = false; 13 14 //Kinetic.js 14 15 this._stage = undefined; … … 17 18 18 19 NeuronDrawer.prototype.initializeNewCanvas = function () { 20 21 if(typeof (this._canvasWidth) == "undefined" && typeof (this._canvasHeight) == "undefined") 22 { 23 var div = $("#" + this._containerContextName); 24 this._canvasWidth = div.width(); 25 this._canvasHeight = div.height(); 26 } 19 27 20 28 this._stage = new Kinetic.Stage({ … … 150 158 yw += this._neurons[neuroId].y;//add position of object to y 151 159 160 //Inputs 152 161 points.push(this._neurons[neuroId].x);//x 153 162 points.push(yw);//y … … 156 165 points.push(yw);//y 157 166 158 points.push(n2.x+n2.sizeX); 159 points.push(n2.y + n2.sizeY/2); 160 161 /*if(diagram?) 167 //straight line to second neuron 168 if(this._lineDebug || (this._neurons[neuroId].x > n2.x)) 162 169 { 163 //straight forward 170 points.push(n2.x+n2.sizeX); 171 points.push(n2.y + n2.sizeY/2); 164 172 } 165 173 else 166 174 { 167 //U-shape 168 }*/ 175 //U - shape 176 //Vertical 177 points.push(this._neurons[neuroId].x - xw);//x 178 points.push(n2.y + n2.sizeY + (input+1)*5);//y 179 180 //Horizontal 181 points.push(n2.x + n2.sizeX);//x 182 points.push(n2.y + n2.sizeY + (input+1)*5);//y 183 184 //Vertical 185 points.push(n2.x + n2.sizeX);//x 186 points.push(n2.y + n2.sizeY/2);//y 187 } 169 188 170 189 var line = new Kinetic.Line({
Note: See TracChangeset
for help on using the changeset viewer.