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

Throw InvalidStateError when calling play() on a finished, reversed, infinite duration animation #475

Merged
merged 2 commits into from
Jul 27, 2016
Merged

Throw InvalidStateError when calling play() on a finished, reversed, infinite duration animation #475

merged 2 commits into from
Jul 27, 2016

Conversation

alancutter
Copy link
Contributor

@alancutter alancutter commented Jul 26, 2016

@@ -141,7 +144,15 @@
play: function() {
this._paused = false;
if (this._isFinished || this._idle) {
this._currentTime = this._playbackRate > 0 ? 0 : this._totalDuration;
if (this._playbackRate >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it significant that this has gone from > 0 to >= 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It kind of emulates the part in the spec that says "Set animation’s hold time to zero." when we don't really have the concept of a hold time here.

@suzyh
Copy link
Contributor

suzyh commented Jul 26, 2016

Given that this has caused the finished play state tests to go backwards, I'm reluctant to merge this until it's clear that that can be fixed.

@alancutter
Copy link
Contributor Author

finish() was already broken.
See follow up patch to make finish() a bit less broken: #477

@suzyh
Copy link
Contributor

suzyh commented Jul 27, 2016

ack, lgtm

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

Successfully merging this pull request may close these issues.

2 participants