paper-scroll-header-panel icon indicating copy to clipboard operation
paper-scroll-header-panel copied to clipboard

Keep header condensed related to content

Open ghost opened this issue 9 years ago • 1 comments

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!

ghost avatar May 05 '16 15:05 ghost

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;

blasten avatar May 25 '16 21:05 blasten