You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clicking "break" will cause the page to freeze. I believe this is because the remove method only removes the object from its parent, which is determined by which object it was added to first. In other words, if you add an object to both a group and a layer (in that order) and then call object.remove(), it will remove the object from the group but not the layer. When a method like draw is called on layer, it will run through its children, find object and then throw an error because object.parent is now null.
Adding an object to multiple containers might just be a bad idea, but at the very least it should raise an exception when you try to do it - a bug like this took awhile to track down.
The text was updated successfully, but these errors were encountered:
on second though, this is a pretty easy change. I'll try and have this fixed by the next release, or the following release. I just need to check if the node has a parent when adding it to a container. If it does, automatically run remove() :)
See: http://jsfiddle.net/jEtbU/1/
Clicking "break" will cause the page to freeze. I believe this is because the remove method only removes the object from its parent, which is determined by which object it was added to first. In other words, if you add an object to both a group and a layer (in that order) and then call object.remove(), it will remove the object from the group but not the layer. When a method like draw is called on layer, it will run through its children, find object and then throw an error because object.parent is now null.
Adding an object to multiple containers might just be a bad idea, but at the very least it should raise an exception when you try to do it - a bug like this took awhile to track down.
The text was updated successfully, but these errors were encountered: