mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -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;
|
return false;
|
||||||
var args = [].slice.call(arguments, 1),
|
var args = [].slice.call(arguments, 1),
|
||||||
PaperScript = paper.PaperScript,
|
PaperScript = paper.PaperScript,
|
||||||
handleException = PaperScript && PaperScript.handleException;
|
handleException = PaperScript && PaperScript.handleException,
|
||||||
|
that = this;
|
||||||
|
|
||||||
function callHandlers() {
|
function callHandlers() {
|
||||||
for (var i in handlers) {
|
for (var i in handlers) {
|
||||||
// When the handler function returns false, prevent the default
|
// When the handler function returns false, prevent the default
|
||||||
// behaviour of the event by calling stop() on it.
|
// 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 && event.stop)
|
||||||
event.stop();
|
event.stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue