André Kuhlmann
André Kuhlmann

Reputation: 4678

Polymer hide drawer on big screens

This is my third question in one week about the Polymer SDK, I'm really sorry about that. Basically I'm trying to hide the drawer of the <paper-drawer-panel> element on a big screen, so that it looks like the mobile version, with this nice hamburger-menu i have coded with the <paper-icon-button> component.

In the official catalog I have found the attribute forceNarrow which I implemented like this.

<paper-drawer-panel forceNarrow>

But this does not take any effect on my actual "big-screen" website

Upvotes: 3

Views: 1152

Answers (1)

Scarygami
Scarygami

Reputation: 15569

The problem is that the new attribute to property mapping in Polymer 1.0 can be a bit confusing.

You would actually have to use a force-narrow attribute in HTML that maps to the forceNarrow property in JS.

<paper-drawer-panel force-narrow>

See https://www.polymer-project.org/1.0/docs/devguide/properties.html#property-name-mapping

Upvotes: 12

Related Questions