mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Do not use Base.each() loops where it's not necessary.
This commit is contained in:
parent
18db7c0d56
commit
e87bf817de
1 changed files with 4 additions and 4 deletions
|
@ -77,12 +77,12 @@ var Callback = {
|
|||
if (!handlers)
|
||||
return false;
|
||||
var args = [].slice.call(arguments, 1);
|
||||
Base.each(handlers, function(func) {
|
||||
for (var i in handlers) {
|
||||
// When the handler function returns false, prevent the default
|
||||
// behaviour of the event by calling stop() on it
|
||||
if (func.apply(this, args) === false && event && event.stop)
|
||||
// behaviour of the event by calling stop() on it.
|
||||
if (handlers[i].apply(this, args) === false && event && event.stop)
|
||||
event.stop();
|
||||
}, this);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue