From 96052dba5cf655dfdeb2bf7edf6c670244172029 Mon Sep 17 00:00:00 2001 From: Shin Date: Fri, 14 Oct 2022 21:10:21 +0700 Subject: [PATCH] Fix Tween.callbackScope --- src/tweens/index.js | 1 + src/tweens/tween/TweenChain.js | 2 +- src/tweens/tween/TweenData.js | 2 +- src/tweens/tween/TweenFrameData.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tweens/index.js b/src/tweens/index.js index 97931f4e0..43ca649ee 100644 --- a/src/tweens/index.js +++ b/src/tweens/index.js @@ -18,6 +18,7 @@ var Tweens = { TweenManager: require('./TweenManager'), Tween: require('./tween/Tween'), TweenData: require('./tween/TweenData'), + TweenFrameData: require('./tween/TweenFrameData'), BaseTween: require('./tween/BaseTween'), TweenChain: require('./tween/TweenChain') diff --git a/src/tweens/tween/TweenChain.js b/src/tweens/tween/TweenChain.js index 1759fec93..032668fc6 100644 --- a/src/tweens/tween/TweenChain.js +++ b/src/tweens/tween/TweenChain.js @@ -501,7 +501,7 @@ var TweenChain = new Class({ if (handler) { - handler.func.apply(handler.scope, [ this ].concat(handler.params)); + handler.func.apply(this.callbackScope, [ this ].concat(handler.params)); } }, diff --git a/src/tweens/tween/TweenData.js b/src/tweens/tween/TweenData.js index 47438fc11..b83299276 100644 --- a/src/tweens/tween/TweenData.js +++ b/src/tweens/tween/TweenData.js @@ -480,7 +480,7 @@ var TweenData = new Class({ var key = this.key; var current = this.current; - var previous = this.previoius; + var previous = this.previous; tween.emit(event, tween, key, target, current, previous); diff --git a/src/tweens/tween/TweenFrameData.js b/src/tweens/tween/TweenFrameData.js index 08af46753..2cbde954f 100644 --- a/src/tweens/tween/TweenFrameData.js +++ b/src/tweens/tween/TweenFrameData.js @@ -363,7 +363,7 @@ var TweenFrameData = new Class({ if (handler) { - handler.func.apply(handler.scope, [ tween, target, 'texture' ].concat(handler.params)); + handler.func.apply(tween.callbackScope, [ tween, target, 'texture' ].concat(handler.params)); } } },