mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix newly introduce bug in Callback#fire()
This commit is contained in:
parent
ed8de613c4
commit
57227b9ff6
1 changed files with 3 additions and 2 deletions
|
@ -78,13 +78,14 @@ var Callback = {
|
|||
return false;
|
||||
var args = [].slice.call(arguments, 1),
|
||||
PaperScript = paper.PaperScript,
|
||||
handleException = PaperScript && PaperScript.handleException;
|
||||
handleException = PaperScript && PaperScript.handleException,
|
||||
that = this;
|
||||
|
||||
function callHandlers() {
|
||||
for (var i in handlers) {
|
||||
// When the handler function returns false, prevent the default
|
||||
// behaviour of the event by calling stop() on it.
|
||||
if (handlers[i].apply(this, args) === false
|
||||
if (handlers[i].apply(that, args) === false
|
||||
&& event && event.stop)
|
||||
event.stop();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue