Setting initial current

Setting initial current location
This commit is contained in:
Diego Teixeira 2018-11-19 16:24:53 -02:00 committed by GitHub
parent 1db9e15a76
commit 1cbceb215d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1208,6 +1208,10 @@ var Tween = new Class({
tweenData.state = TWEEN_CONST.COMPLETE;
break;
}
if (!tweenData.elapsed && tweenData.current) {
tweenData.elapsed = tweenData.duration * tweenData.current;
}
var elapsed = tweenData.elapsed;
var duration = tweenData.duration;
@ -1319,7 +1323,7 @@ var Tween = new Class({
tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start);
tweenData.current = tweenData.start;
tweenData.current = tweenData.current || tweenData.start;
tweenData.target[tweenData.key] = tweenData.start;