diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index fb5d9a8..5199754 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -263,7 +263,7 @@ */ InteractionManager.prototype.update = function () { - requestAnimationFrame(this.updateBound); + this.requestId = requestAnimationFrame(this.updateBound); if( this.throttleUpdate() || !this.interactionDOMElement) { @@ -809,6 +809,8 @@ * Destroys the interaction manager */ InteractionManager.prototype.destroy = function () { + this.removeEvents(); + this.renderer = null; this.mouse = null; @@ -843,6 +845,8 @@ this.processTouchMove = null; this._tempPoint = null; + + cancelAnimationFrame(this.requestId); this.updateBound = null; };