fix deatach

This commit is contained in:
Anton Lavrenov
2020-04-23 08:59:19 -05:00
parent b8a3a5af19
commit f58635bbf6
4 changed files with 113 additions and 1355 deletions

View File

@@ -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() {