Perhaps the easy way to do this, correct me if I'm wrong, is to give the 
core-drawer-panel 
an id (mainmenu for example),
Then on the button you want to open the menu 
have 
onclick="document.getElementById('mainmenu').setAttribute('selected','drawer');"
Of course this means you can't use the same button to hide the menu again 
(you could modify the onclick to include an if) but most people have their 
menus cover their buttons anyway.


On Thursday, 9 April 2015 20:47:14 UTC+1, Rob Dodson wrote:
>
> Rather than use core-drawer-toggle, I would recommend you manually call 
> the toggle method of the core-drawer-panel element whenever that div inside 
> of your custom-element is clicked. I may go about this by listening for 
> click, or a custom event coming from custom-element, in some common parent 
> (whatever is holding the core-drawer-panel). When the parent hears that 
> event, it calls toggle on core-drawer-panel.
>
> On Sun, Apr 5, 2015 at 11:24 AM, Sébastien MARCELLIN <[email protected] 
> <javascript:>> wrote:
>
>> i'm trying scaffold an interface with a app-element who implement the 
>> core-drawer. Into the main drawer-div, i have some custom elements and i 
>> want to give us the capability to display or hide the drawer panel.
>>
>> By example, my main app element should be :
>>
>> <core-drawer-panel> <div drawer> ... </div> <div main> 
>> <other-custom-element></other-custom-element> </div> </core-drawer-panel>
>>
>> And my custom element :
>>
>> <polymer-element name="custome-element"> ... <div core-drawer-toggle>clic me 
>> to open the drawer parent !</div> ... </polymer-element>
>>
>> Of course, that doesn't work because core-drawer-toggle don't know is 
>> parent.... So, how can i do that ?
>>
>>
>> Thanks !
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/polymer-dev/b86e5fa9-6242-45b5-9ad8-8412777414b5%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/polymer-dev/b86e5fa9-6242-45b5-9ad8-8412777414b5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/6f6cccb3-8226-4afa-9185-5c0984145a42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to