-
Notifications
You must be signed in to change notification settings - Fork 30
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
Animation constructor easing #136
Conversation
The update to mocha.js is unrelated, I'd prefer it to be in its own change as it's very large. We should probably fix the version of mocha so we don't run into this hassle with the git-status check. |
I can do a separate CL for the mocha update, but I don't know how to remove the diff from this CL. |
Need to fix, but might want to do some refactoring at the same time.
@@ -15,7 +15,8 @@ | |||
(function(shared, scope, testing) { | |||
|
|||
function groupChildDuration(node) { | |||
return node.timing.delay + node.activeDuration + node.timing.endDelay; | |||
var _timing = shared.normalizeTimingInput(node.timing); |
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.
We don't want to be normalizing here if possible as this function gets called multiple times per frame.
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.
should be OK to use node._timing
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.
Done.
so that we don't have to re-normalize when we compute durations.
@shans @alancutter ptal |
Fix bug #131.
Timing functions weren't working with explicitly constructed Animations because normalizeTimingInput was being called twice.
Now we store the raw timing input in TimedItem.timing, and the normalized timing in TimedItem._timing.
Timing is normalized at creation time for explicitly constructed timed items, and at play time (in scope.AnimationTimeline.prototype._play) for timed items created using Element.animate.
@shans ptal