mirror of
https://github.com/konvajs/konva.git
synced 2025-12-17 18:01:15 +08:00
add comment
This commit is contained in:
@@ -1027,6 +1027,7 @@
|
|||||||
* node.moveTo(layer2);
|
* node.moveTo(layer2);
|
||||||
*/
|
*/
|
||||||
moveTo: function(newContainer) {
|
moveTo: function(newContainer) {
|
||||||
|
// do nothing if new container is already parent
|
||||||
if (this.getParent() !== newContainer) {
|
if (this.getParent() !== newContainer) {
|
||||||
this.remove();
|
this.remove();
|
||||||
newContainer.add(this);
|
newContainer.add(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user