googlearchive / core-scroll-header-panel

Fancy scrolling effects where the header animates between tall and condensed states
19 stars 16 forks source link

No scrolling header after importing new Polymer elements dynamically #17

Closed noreikat closed 10 years ago

noreikat commented 10 years ago

Importing new Polymer elements dynamically (with Polymer.import() or document.head.appendChild(link)) breaks the header's scrolling behavior.

noreikat commented 10 years ago

Invoking document.querySelector('core-scroll-header-panel').measureHeaderHeight() in the callback of Polymer.import() helps. It seems that adding new Polymer imports invokes Polymer('core-scroll-header-panel', { publish: { ..., headerHeight: 0, ...} }) again.

noreikat commented 10 years ago

No need for that workaround anymore