mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-13 16:33:28 -04:00
Make sure the frame handler stops when a view is removed.
This commit is contained in:
parent
abcba7deb4
commit
3e71278b78
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ var DocumentView = this.DocumentView = Base.extend({
|
|||
var res = Base.splice(this._document.views, null, this._index, 1);
|
||||
// Uninstall event handlers again for this view.
|
||||
DomEvent.remove(this._canvas, this._events);
|
||||
this._document = this._canvas = this._events = null;
|
||||
// Clearing _onFrame makes the frame handler stop automatically.
|
||||
this._document = this._canvas = this._events = that._onFrame = null;
|
||||
return !!res.length;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue