Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
update to use web animations 'finish' event
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvonne Yip committed Apr 23, 2014
1 parent 7c9e7f2 commit 117c209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions polymer-ui-animated-pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
applyTransition: function() {
if (this.prevSelectedItem) {
this.animation = this.makeTransitionAnimation();
document.timeline.play(this.animation);
var player = document.timeline.play(this.animation);
player.onfinish = this.animationEndAction.bind(this);
// Apply the class after the animation starts playing to prevent
// a flicker at the end of the animation.
this.async(function() {
Expand Down Expand Up @@ -115,7 +116,6 @@
fill: 'none',
direction: direction
});
animation.onend = this.animationEndAction.bind(this);
return animation;
},
selectedItemChanged: function(oldItem) {
Expand Down

0 comments on commit 117c209

Please sign in to comment.