Store _removeSets per project, not globally.

This commit is contained in:
Jürg Lehni 2013-06-12 13:50:05 -07:00
parent f59882b757
commit 8c596927fb
2 changed files with 3 additions and 2 deletions

View file

@ -3072,7 +3072,8 @@ var Item = Base.extend(Callback, /** @lends Item# */{
for (var name in obj) {
if (obj[name]) {
var key = 'mouse' + name,
sets = Tool._removeSets = Tool._removeSets || {};
project = this._project,
sets = project._removeSets = project._removeSets || {};
sets[key] = sets[key] || {};
sets[key][this._id] = this;
}

View file

@ -324,7 +324,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
_fireEvent: function(type, event) {
// Handle items marked in removeOn*() calls first,.
var sets = Tool._removeSets;
var sets = paper.project._removeSets;
if (sets) {
// Always clear the drag set on mouseup
if (type === 'mouseup')