Closed morganwu closed 8 years ago
By PC mode, do you mean when the screen is greater than the responsive width?
You might want to look into instead of using the toggleDrawer()
method, write another method that adds and removes the force-narrow
attribute on the press of the toggle button.
The solution is not the most elegant one, but it saves you hacking into the element.
@WoodyWoodsta thank you for your answer and yes that is what I mean. I tried your answer, it works indeed.
I want the drawer can be closed by hand even in pc mode, just like the behavior of the side bar in user home page of new version Google Plus. I tried to force the drawer panel to be narrow, so I can toggle the drawer by calling togglePanel() when I clicked the menu icon, but the only issue is I want the drawer keep open before I click the menu button again, but the drawer will be closed anyway when I click on the backdrop(scrim). So is there any way to do that? Thanks.