diff --git a/lib/scatter.js b/lib/scatter.js index 14c5c2d..6459140 100644 --- a/lib/scatter.js +++ b/lib/scatter.js @@ -351,7 +351,9 @@ export class AbstractScatter extends Throwable { } close() { + console.log('SCATTER WAS CLOSED!') this._callCloseCallbacks() + this._removeCallbacks() this._removeSelfFromScatterContainer() } @@ -361,6 +363,11 @@ export class AbstractScatter extends Throwable { } } + _removeCallbacks() { + this.onClose = [] + this.onTransform = [] + } + _removeSelfFromScatterContainer() { // Removes self from container when it's closed. if (this.container) {