core-header-panel waterfall mode: can't stop auto-expanding at a certain content & viewport height

102 views
Skip to first unread message

fra...@gmail.com

unread,
Jul 24, 2014, 5:31:46 AM7/24/14
to polym...@googlegroups.com
Please see jsbinhttp://jsbin.com/zeyoh/1

I merely copied the core-header-panel demo, but changed the content height from 2000px to 300px. As you can see, the bottom part of the content portion can't be accessed because the header automatically tries to expand itself, hence pushing part of the content down, even if supposedly there isn't enough space to expand yet.

I'm not sure, but I think this can be fixed I guess by adding a check in this line to compute the content & viewport heights to see if it's the correct time to expand the header already. Though this is quite a dirty fix, let's discuss this first and see if someone else might have a more elegant solution. If not, then I'll go ahead and take a jab at it by submitting a PR to the core-header-panel repo.

So, any better ideas how to work around this?

fra...@gmail.com

unread,
Jul 24, 2014, 5:55:39 AM7/24/14
to polym...@googlegroups.com, fra...@gmail.com
I'd like to add that I've just realized computing for the viewport height is a bad idea since that only assumes that the core-header-panel element is taking up all of the viewport's space. So I guess scratch that suggestion for a solution.

Frankie Fu

unread,
Jul 24, 2014, 1:30:10 PM7/24/14
to fra...@gmail.com, polymer-dev


Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/45dc4f9b-da16-43c1-ba7b-28b194041f3c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages