Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Can't stop tween when Infinit repeat. #41

Closed
lizistorm opened this issue Oct 30, 2017 · 5 comments
Closed

Can't stop tween when Infinit repeat. #41

lizistorm opened this issue Oct 30, 2017 · 5 comments

Comments

@lizistorm
Copy link

Can't stop tween when Infinit repeat. It just ignore when _isFinite is false in Tween.stop/Lite.stop.

But in origin tween.js version there is no _isFinite check in stop function.

@dalisoft
Copy link
Collaborator

dalisoft commented Nov 1, 2017

Hi. Thanks for issue. I know this bug, because of createUi i did this trick. But i will introduce major update in 2-3days or max next week. Until it please wait. I am very want fix, but because of my work i have not time

@dalisoft
Copy link
Collaborator

dalisoft commented Nov 1, 2017

Or you can modify code for yourself. If not know TypeScript, after installation with npm, run 'tsc' on directory and you should see src compiled foldrr

@lizistorm
Copy link
Author

OK. Thanks!

Just remove _isFinite check in stop().

change
if (!_isPlaying || !_isFinite) { return this; }
to
if (!_isPlaying) { return this; }

And maybe _r in stop() should be _reversed. Or it will not go back to start value when reversed.

change
let atEnd = (_r + 1) % 2 === 1;
to
let atEnd = _reversed % 2 === 1;

@dalisoft
Copy link
Collaborator

dalisoft commented Nov 1, 2017

I already fix that in local machine. Just not find time to upload. Thanks for fix again

dalisoft added a commit that referenced this issue Nov 5, 2017
@dalisoft
Copy link
Collaborator

dalisoft commented Nov 5, 2017

Your issue should resolve 4.0.1

@dalisoft dalisoft closed this as completed Nov 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants