googlearchive / app-layout-templates

Provides some basic application layout templates
http://polymerelements.github.io/app-layout-templates/
245 stars 78 forks source link

How is isMobile populated #3

Closed devAtPolydeals closed 9 years ago

devAtPolydeals commented 9 years ago

I see at https://github.com/PolymerElements/app-layout-templates/blob/master/nav-list-detail/src/x-app.html#L38 there is a function call [[_computeListWidth(_isMobile)]] ; how does it know the value of isMobile, who populates it? I don't see any media-query hence am confused.

askibinski commented 9 years ago

I'm wondering myself... The other list-card-over example (https://github.com/PolymerElements/app-layout-templates/blob/master/list-card-over/src/x-app.html) does have a media query element which binds the value of _isMobile:

But I'm not sure how this works in nav-list-detail because I don't see such a query. Weird.

frankiefu commented 9 years ago

paper-drawer-panel has a narrow property and _isMobile is bind to that to know when the drawer is in narrow layout.

devAtPolydeals commented 9 years ago

@frankiefu so based on responsive-width="600px" it makes narrow = true and that inturn makes isMobile = true correct?

frankiefu commented 9 years ago

@devAtPolydeals yes, that's correct.

devAtPolydeals commented 9 years ago

cool thanks @frankiefu :+1: