mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Store _removeSets per project, not globally.
This commit is contained in:
parent
f59882b757
commit
8c596927fb
2 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue