From 0962d6c1ff803ec35f706191554061e7ad297b6a Mon Sep 17 00:00:00 2001 From: Yvonne Yip Date: Wed, 6 Nov 2013 11:47:49 -0800 Subject: [PATCH] polymer-overlay: add .animating class when transitioning --- polymer-overlay/polymer-overlay.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/polymer-overlay/polymer-overlay.html b/polymer-overlay/polymer-overlay.html index 1e93936..9cac4c3 100644 --- a/polymer-overlay/polymer-overlay.html +++ b/polymer-overlay/polymer-overlay.html @@ -291,6 +291,8 @@ animation.apply(), new Animation(this.target, [{'visibility': 'visible', 'display':'block'}]) ], {fill: 'none'}); + transition.onend = this.completeOpening.bind(this); + this.target.classList.add('animating'); document.timeline.play(transition); }, renderOpened: function() { @@ -315,6 +317,7 @@ } }, completeOpening: function() { + this.target.classList.remove('animating'); this.target.classList.toggle('revealed', this.opened); if (!this.opened) { this.resetTargetPosition();