Merge branch 'master' of github.com:mjhasbach/KineticJS into mjhasbach-master

This commit is contained in:
Лаврёнов Антон
2014-08-19 19:46:37 +08:00

View File

@@ -1027,8 +1027,10 @@
* node.moveTo(layer2);
*/
moveTo: function(newContainer) {
Kinetic.Node.prototype.remove.call(this);
newContainer.add(this);
if (this.getParent() !== newContainer) {
this.remove();
newContainer.add(this);
}
return this;
},
/**