Skip to content

Commit

Permalink
Fix resize problem described in issue #115
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorBreakfast committed Dec 10, 2015
1 parent ee5c7e6 commit 6e7b63d
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions neon-animated-pages.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
name: 'opaque-animation',
node: selectedPage
}];

// send resize notification, so that the page can adapt its size
this.resizerShouldNotify = function(element) {
return element == selectedPage;
}
this.notifyResize();

// configure selectedPage animations.
if (this.entryAnimation) {
Expand Down Expand Up @@ -201,7 +207,6 @@
node.classList && node.classList.remove('neon-animating');
}
}
this.async(this._notifyPageResize);
},

_onNeonAnimationFinish: function(event) {
Expand All @@ -210,16 +215,7 @@
return;
}
this._completeSelectedChanged(event.detail.fromPage, event.detail.toPage);
},

_notifyPageResize: function() {
var selectedPage = this.selectedItem;
this.resizerShouldNotify = function(element) {
return element == selectedPage;
}
this.notifyResize();
}

})

})();
Expand Down

0 comments on commit 6e7b63d

Please sign in to comment.