Call Function On Polymer Navigation Drawer Panel
I am stuck. I am playing around with polymer but I do not manage to call the togglePanel function on the drawer panel and my code looks like this:
Solution 1:
core-drawer-panel
stays open all the time if the window size is less than responsiveWidth
. By default it will generally stay open unless you are on a tablet device or smaller.
If you set responsiveWidth
really high, you can alter the behavior so it only opens on demand.
<core-drawer-panel id="main-drawer" responsiveWidth="900em">
http://jsbin.com/zorufa/2/edit
Solution 2:
An other way too keep the drawer close.
edit the code in core-drawer-panel.hmlt and edit the publish attribute of forceNarrow=true
If true, ignore responsiveWidth
setting and force the narrow layout.
Or with javascript
$scaffold = document.querySelector('scaffold');
$scaffold.shadowRoot.querySelector('core-drawer-panel').forceNarrow = true;
$scaffold.closeDrawer();
Post a Comment for "Call Function On Polymer Navigation Drawer Panel"