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

Tween only run first time since 5.4.x #65

Closed
homerjam opened this issue Apr 8, 2019 · 5 comments
Closed

Tween only run first time since 5.4.x #65

homerjam opened this issue Apr 8, 2019 · 5 comments

Comments

@homerjam
Copy link

homerjam commented Apr 8, 2019

Repro url: https://codesandbox.io/embed/24w5k8v3zn

Describe the bug
Since version 5.4.x tweens seem to only play first time around. For example I have the following code which creates and runs a new tween programatically, this works as expected in 5.3.x but only works the first time in 5.4.x.

I see there were some changes that mention timeline - could this be something to do with it?

Thanks

    watch() {
      new Tween({ offset: this.alternate ? 0 : 1 })
        .to({ offset: this.alternate ? 1 : 0 }, this.speed)
        .easing({
          offset: Easing.Quadratic.InOut,
        })
        .on('update', this.render)
        .start();
    },

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@dalisoft
Copy link
Collaborator

dalisoft commented Apr 9, 2019

Hello and thanks for using this library. Please, can you create simple codepen snippet for i am being able to see what happens and fixing issue

@homerjam
Copy link
Author

homerjam commented Apr 9, 2019

https://codesandbox.io/embed/24w5k8v3zn

I would expect the tween to run every time I click (it does with 5.3.x)...

@dalisoft
Copy link
Collaborator

dalisoft commented Apr 9, 2019

Thanks @homerjam. I got what going wrong, i soon fix.
There you can watch minimal pen of what's wrong: https://jsbin.com/luyizar/edit?js,console

@dalisoft dalisoft added this to the v5.x milestone Apr 9, 2019
@dalisoft
Copy link
Collaborator

dalisoft commented Apr 9, 2019

@homerjam Can you try v5.4.2? It is fixed for your app?

i see, it works
if yes, please close issue

@dalisoft dalisoft removed this from the v5.x milestone Apr 10, 2019
@homerjam
Copy link
Author

Yes it works! (tested with 5.4.3) Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants