mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 08:49:50 -04:00
Add support for Item#removeOnMove().
This commit is contained in:
parent
ad71293983
commit
7ae504e51f
1 changed files with 2 additions and 2 deletions
|
@ -799,7 +799,7 @@ var Item = this.Item = Base.extend({
|
||||||
}
|
}
|
||||||
}, new function() {
|
}, new function() {
|
||||||
var sets = {
|
var sets = {
|
||||||
down: {}, drag: {}, up: {}
|
down: {}, drag: {}, up: {}, move: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
function removeAll(set) {
|
function removeAll(set) {
|
||||||
|
@ -838,7 +838,7 @@ var Item = this.Item = Base.extend({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Base.each(['up', 'down', 'drag'], function(name) {
|
return Base.each(['down', 'drag', 'up', 'move'], function(name) {
|
||||||
this['removeOn' + Base.capitalize(name)] = function() {
|
this['removeOn' + Base.capitalize(name)] = function() {
|
||||||
var hash = {};
|
var hash = {};
|
||||||
hash[name] = true;
|
hash[name] = true;
|
||||||
|
|
Loading…
Reference in a new issue