- Timestamp:
- 04/06/14 12:18:53 (11 years ago)
- Location:
- js/viewer-f0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
js/viewer-f0/css/styles.css
r208 r214 7 7 height: 500px; 8 8 width: 500px; 9 display: inline; 9 display: inline-block; 10 border-style: solid; 10 11 } 11 12 -
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({ -
js/viewer-f0/js/Viewer.js
r209 r214 7 7 }; 8 8 9 this._showNeurons = true;10 this._showVisualization = true;11 this._visualizationContext = undefined;12 this._neuronsContext = undefined;13 9 this._context = undefined; 14 this._urlToXML = "http://www.framsticks.com/files/apps/config/f0def.xml";10 this._urlToXML = 'f0def.xml';//"http://www.framsticks.com/files/apps/config/f0def.xml"; 15 11 this._xml = undefined; 16 12 this._model = new Model(); … … 24 20 this._neuroConns = []; 25 21 this._neuroClasses = {}; 26 this._modelOne = undefined;27 22 this._graphicsEngine = undefined; 28 23 this._neuronDrawer = undefined; … … 302 297 //var debugCreatureName = "example4"; 303 298 //var debugCreatureName = "caterpillar"; 304 var debugCreatureName = "Quadro"; 299 //var debugCreatureName = "Quadro"; 300 var debugCreatureName = "spider"; 305 301 //viewer.VisualizationSettings.context = $("#container3"); 306 302 //viewer.VisualizationSettings.width = 400; 307 303 //viewer.VisualizationSettings.height = 400; 308 304 viewer.NetworkSettings.context = "containerNeuron3"; 309 viewer.NetworkSettings.width = 400;310 viewer.NetworkSettings.height = 400;305 //viewer.NetworkSettings.width = 400; 306 //viewer.NetworkSettings.height = 400; 311 307 viewer.run(viewer.Mode.LINK, "http://localhost:63343/FramestickFavi/creatures/" + debugCreatureName + ".txt"); 312 308 }
Note: See TracChangeset
for help on using the changeset viewer.