mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Support more than one argument in Callback#fire().
This commit is contained in:
parent
32eb10b43b
commit
c4a66cff0a
1 changed files with 2 additions and 1 deletions
|
@ -72,11 +72,12 @@ var Callback = {
|
|||
var handlers = this._handlers && this._handlers[type];
|
||||
if (!handlers)
|
||||
return false;
|
||||
var args = [].slice.call(arguments, 1);
|
||||
Base.each(handlers, function(func) {
|
||||
// When the handler function returns false, prevent the default
|
||||
// behaviour of the event by calling stop() on it
|
||||
// PORT: Add to Sg
|
||||
if (func.call(this, event) === false && event && event.stop)
|
||||
if (func.apply(this, args) === false && event && event.stop)
|
||||
event.stop();
|
||||
}, this);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue