mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Fix recently introduced errors in setting of Tool#_document.
This commit is contained in:
parent
9ef542ff9a
commit
afe61d61ac
1 changed files with 6 additions and 8 deletions
|
@ -88,14 +88,12 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
|
|||
that.events.mouseup(event);
|
||||
}
|
||||
};
|
||||
|
||||
if (paper.document) {
|
||||
// Remove old events first.
|
||||
if (this._document)
|
||||
Event.remove(this._document.canvas, this.events);
|
||||
this._document = doc || paper.document;
|
||||
Event.add(doc.canvas, this.events);
|
||||
}
|
||||
|
||||
// Remove old events first.
|
||||
if (this._document)
|
||||
Event.remove(this._document.canvas, this.events);
|
||||
this._document = doc;
|
||||
Event.add(doc.canvas, this.events);
|
||||
},
|
||||
|
||||
getDocument: function() {
|
||||
|
|
Loading…
Reference in a new issue