From 6e7b63dacdca0592603463503e91e61200a2b804 Mon Sep 17 00:00:00 2001 From: Josef Brandl Date: Thu, 10 Dec 2015 21:22:23 +0100 Subject: [PATCH] Fix resize problem described in issue #115 --- neon-animated-pages.html | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/neon-animated-pages.html b/neon-animated-pages.html index 6554c01..cfb4d7d 100644 --- a/neon-animated-pages.html +++ b/neon-animated-pages.html @@ -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) { @@ -201,7 +207,6 @@ node.classList && node.classList.remove('neon-animating'); } } - this.async(this._notifyPageResize); }, _onNeonAnimationFinish: function(event) { @@ -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(); } - }) })();