FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

If an Animation instance is played more than once, the same promise is resolved each time leading to unexpected results. · Issue #774 · NativeScript/NativeScript · GitHub

If an Animation instance is played more than once, the same promise is resolved each time leading to unexpected results. #774

Description

Since the finished promise of an Animation is one and the same during the life of the animation, the Animation cannot be properly played multiple times, i.e. the following code fails:

animation1.play().finished
    .then(function () { return animation1.play().finished; })
    .then(function () { return animation1.play().finished; })

We should make the play() method return a new Promise each time it is played.

In other words, there should be a new promise returned for each play invocation -- not one promise per Animation instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL