From af2a03c23540ea5e2104aa597bbbc703659dc57c Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Wed, 12 Aug 2015 18:44:50 -0700 Subject: [PATCH] Fix #38 --- paper-scroll-header-panel.html | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/paper-scroll-header-panel.html b/paper-scroll-header-panel.html index b43951b..f72788a 100644 --- a/paper-scroll-header-panel.html +++ b/paper-scroll-header-panel.html @@ -484,12 +484,8 @@ }, _condensesChanged: function() { - if (this.condenses) { - this._scroll(); - } else { - // reset transform/opacity set on the header - this._condenseHeader(null); - } + this._updateScrollState(this.scroller.scrollTop); + this._condenseHeader(null); }, _setup: function() { @@ -562,14 +558,12 @@ if (this.header) { this._updateScrollState(this.scroller.scrollTop); - if (event) { - this.fire('content-scroll', { - target: this.scroller - }, - { - cancelable: false - }); - } + this.fire('content-scroll', { + target: this.scroller + }, + { + cancelable: false + }); } }, @@ -592,7 +586,7 @@ this._setHeaderState(this.HEADER_STATE_INTERPOLATED); } - if (!event || !this.fixed && y !== this._y) { + if (!this.fixed && y !== this._y) { this._transformHeader(y); }