Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent animated values from leaving expected bounds #7

Merged
merged 5 commits into from
May 3, 2020

Conversation

ryanmoelter
Copy link
Contributor

@ryanmoelter ryanmoelter commented Apr 28, 2020

Resolves #4. Sometimes, a value will leave the expected bounds because of chained or delayed animations, and this can cause problems in some cases. But not anymore.

  • Clarify committed vs. started animations
    • Committed animations have been scheduled and the set containing them has been .start()ed.
    • Started animations are currently running.
  • Cancel committed animations if another animation on the same subject and property is started before they start.
  • Prevent animations declared in the same set from cancelling each other by adding a concept of "fully committed" animations.

For an animation that does this if you trigger it once:

2020-04-29 20-49-13

It used to fly off the screen like so if you triggered it multiple times:
2020-04-29 21-19-03

But now it stays neatly within the expected bounds of the individually-queued animations:
2020-04-29 20-48-58

@ryanmoelter ryanmoelter changed the title [WIP] Prevent animated values from leaving expected bounds Prevent animated values from leaving expected bounds Apr 30, 2020
Copy link
Contributor

@narenmanoharan narenmanoharan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Other than the minor comment.

@ryanmoelter ryanmoelter merged commit 7a20df2 into master May 3, 2020
@ryanmoelter ryanmoelter deleted the unexpected-values branch August 13, 2020 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Prevent animation values from being outside the expected bounds
2 participants