Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep header condensed related to content #95

Open
ghost opened this issue May 5, 2016 · 1 comment
Open

Keep header condensed related to content #95

ghost opened this issue May 5, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented May 5, 2016

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!

@blasten
Copy link
Contributor

blasten commented May 25, 2016

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant