openworm / org.geppetto

Geppetto is an open-source platform to build web-based applications to visualize and simulate neuroscience data and models.
http://geppetto.org
Other
209 stars 50 forks source link

Js error when updating entities with new server updates #228

Closed adrianq closed 9 years ago

adrianq commented 10 years ago

@jrmartin There is a js error when updating entities values with new server updates from a running simulation.
screenshot from 2014-09-03 17 22 47

It looks like nodeA isn't a proper backbone node but a String.

if(nodeA._metaType == "AspectNode"){

I have implemented a getChildren method (in a fork) which returns entities and aspect for EntityNode. Maybe it could be a good option instead of iterating through the node like this:

for (var a in node) {
    var nodeA = node[a];
jrmartin commented 10 years ago

@adrianq Which simulation is the one that throws that error? I can't duplicate it.

A getChildren() for EntityNode should be fine. There's also getAspects and getEntities methods in EntityNode which combined are equal to the getChildren method

tarelli commented 10 years ago

@tarelli try to reproduce this

tarelli commented 10 years ago

This seems to happen only in https://github.com/openworm/org.geppetto.frontend/tree/adrianq-neuromlWidget