Keep header condensed related to content
I would like to keep the header condensed related to content, meaning that for some content I want the normal behavior of the scrolling with the keepCondensedHeader, but for some other content I want the condensed version. I'm not able to do that since the header keeps scrolling...
I have something like this:
if(this.content != contentA){
(<any>this._element).condense();
(<any>this._element).scroll((<any>this._element).condensedHeaderHeight * 2);
(<any>this._element).headerHeight = (<any>this._element).condensedHeaderHeight / 2;
(<any>this._element).fixed = true;
} else {
(<any>this._element).scrollToTop();
(<any>this._element).fixed = false;
}
and
<paper-scroll-header-panel main id="headerPanelMain" condenses keep-condensed-header>
<paper-toolbar id="mainToolbar" class="tall"></paper-toolbar>
<div class="content" scroller>**dynamic-content**</div>
</paper-scroll-header-panel>
My problem is that the fixed option reestablishes the original header size...
Anyone facing the same issue? Thanks!
I don't think fixed is causing the issue. condensedHeaderHeight is dynamically calculated when you change the headerHeight property, so you are decreasing the header's size every time you run
(<any>this._element).headerHeight = (<any>this._element).condensedHeaderHeight / 2;