mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fix deatach
This commit is contained in:
@@ -462,10 +462,11 @@ export class Transformer extends Group {
|
||||
* transformer.detach();
|
||||
*/
|
||||
detach() {
|
||||
if (this.getNode()) {
|
||||
this.getNode().off('.' + EVENTS_NAME);
|
||||
this._nodes = [];
|
||||
}
|
||||
// remove events
|
||||
this._nodes.forEach(node => {
|
||||
node.off('.' + EVENTS_NAME);
|
||||
});
|
||||
this._nodes = [];
|
||||
this._resetTransformCache();
|
||||
}
|
||||
_resetTransformCache() {
|
||||
|
Reference in New Issue
Block a user