Remove Tool#setDocument().

This commit is contained in:
Jürg Lehni 2011-05-07 14:50:31 +01:00
parent 2f6fbcba74
commit ef8a2aad9b

View file

@ -89,21 +89,17 @@ var Tool = this.Tool = ToolHandler.extend(new function() {
}
};
if (paper.document)
this.setDocument(paper.document);
},
getDocument: function() {
return this._document;
},
setDocument: function(doc) {
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);
}
},
getDocument: function() {
return this._document;
},
/**