-
Notifications
You must be signed in to change notification settings - Fork 148
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
Refactor and improve animation logic. #295
Conversation
I'm going to split the refactoring and logic changes out from the demo CSS changes so they're isolated. |
Updated this PR to remove the changes to the development demo |
The demo CSS changes are now in #296. |
} else { | ||
spf.tasks.suspend(key); // Suspend main queue for animation. | ||
var animationKey = spf.tasks.key(el); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra nl here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
- Make the start state more reliable by delaying for 17ms (1 frame at 60 frames/second) before running the animation. - Refactor the animation logic into separate dedicated functions for clarity: prepare, run, complete. - Store animation-related data in a dedicated object. - Rename a couple DOM methods to better communicate what they do.
Extra blank lines removed. |
lgtm |
Refactor and improve animation logic.
Post-commit associating this with #299. |
(1 frame at 60 frames/second) before running the animation.
clarity: prepare, run, complete.