mirror of
https://github.com/konvajs/konva.git
synced 2026-01-23 13:26:07 +08:00
Make sure to schedule draw when calling removeChildren or destroyChildren
This commit is contained in:
@@ -83,6 +83,8 @@ export abstract class Container<
|
||||
child.remove();
|
||||
});
|
||||
this.children = [];
|
||||
// because all children were detached from parent, request draw via container
|
||||
this._requestDraw();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
@@ -98,6 +100,8 @@ export abstract class Container<
|
||||
child.destroy();
|
||||
});
|
||||
this.children = [];
|
||||
// because all children were detached from parent, request draw via container
|
||||
this._requestDraw();
|
||||
return this;
|
||||
}
|
||||
abstract _validateAdd(node: Node): void;
|
||||
|
||||
Reference in New Issue
Block a user