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

Commit

Permalink
polymer-collapse: better way to check for initial update
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Sep 16, 2013
1 parent 298dd8e commit a08a3e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions polymer-collapse/polymer-collapse.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@
enteredDocument: function() {
this.installControllerStyles();
this.inDocument = true;
this.async(function() {
this.afterInitialUpdate = true;
});
},
leftDocument: function() {
this.removeListeners(this.target);
Expand Down Expand Up @@ -199,7 +202,6 @@
// for initial update, skip the expanding animation to optimize
// performance e.g. skip calcSize
if (!this.afterInitialUpdate) {
this.afterInitialUpdate = true;
this.transitionEnd();
return;
}
Expand All @@ -213,7 +215,6 @@
});
},
hide: function() {
this.afterInitialUpdate = true;
// don't need to do anything if it's already hidden
if (this.hasClosedClass && !this.fixedSize) {
return;
Expand Down

0 comments on commit a08a3e4

Please sign in to comment.