Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open-, close- and togglePanel should *always* work #103

Open
liebrand opened this issue Oct 20, 2015 · 6 comments
Open

open-, close- and togglePanel should *always* work #103

liebrand opened this issue Oct 20, 2015 · 6 comments

Comments

@liebrand
Copy link

Currently the open-, close- and togglePanel functions only work on mobile (eg narrow mode). I want to be able to open/close the drawer on desktop as well. In other words, I want to have my drawer behave the way that Google's Inbox drawer works as well.

The drawer should still default to closed on mobile (and the main page should still dim when the drawer is opened on mobile), but the decision to open/close/toggle based on the responsiveWidth currently is a bug IMHO

@frankiefu
Copy link
Contributor

As a workaround you could do something like this in paper-drawer-panel.

http://jsbin.com/lunixiholu/edit?html,output

@liebrand
Copy link
Author

Ah, I have a workaround using forceNarrow, but didn't hook up it up a media query (so my workaround doesn't work on mobile). Thanks for the suggestion!

@blasten blasten removed the bug label Oct 21, 2015
@ghost
Copy link

ghost commented Oct 31, 2015

I'm with liebrand about this. I need the close and open functions to work when im on a desktop layout and not respond only to the narrow mode.
In my app i've got some sections to show my works(i'm an illustrator), and it's convenient to use all the screen possibles in this sections and close the drawer.
Also i suggest that the drawerToggleAttribute need to be optional if you wanted to hide.

@JosefJezek
Copy link

I would like close the drawer on desktop. 👍

Nice solution have Google Plus, check out the https://plus.google.com

@Zecat
Copy link

Zecat commented Jan 3, 2016

Take a look at my master branch, I made some modifications about toggle feature on desktop, tell me what you think. Demo is here. To summarize :

  • drawerWidth attribute replaced with var --paper-drawer-panel-drawer-container-width
  • remove the needs of _computeMainStyle() & _computeDrawerStyle()
  • transitions are added on attached instead of on ready because #main default to left:0 and #main:not(.iron-selector) default to left:256px. As iron-selector class is added after ready (but before attached), left was translating from 256 to 0px on first render
  • some style modifications for the drawer to toggle on desktop
  • make the toggle button desapear when drawer is opened on desktop

@vitalygoji
Copy link

I tried to embed paper-drawer-pane in existing GWT application - no matter what I tried toggle is not working. I tried every method etc.. No JavaScript errors generated - just not working. How funny...
Most of other Polymer components are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants