0
votes

I have a paper-drawer-panel that has a closed drawer. When I click a fab I open the drawer and hide the fab. However when the drawer closes again I would like to re-show the fab.

My question is this: How do I know when the drawer is closing?

I looked into the two events listed in the paper-drawer-panel docs and tried both paper-select and paper-responsive-change. I used them in the following way:

html:

<paper-drawer-panel right-drawer force-narrow narrow paper-select="changed">
  <div main> content... </div>
  <div drawer> drawer content </div>
</paper-drawer-panel>

js:

changed:function(){
  console.log("inside event");
}

should this work? can anyone offer some suggestions?

2
I solved this problem by changing paper-select to on-iron-select thanks @TrevorDixonuser3562299
The _isMainSelected method of the paper-drawer-panel works too.miyamoto

2 Answers

0
votes

As I mentioned in the comment, I solved this by using TrevorDixon's advice and changing paper-select to on-iron-select

0
votes

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

menuToggle: function() {
        if (this.$.paper_drawer_panel.narrow && $(this.$.paper_drawer_panel).width() < parseInt(this.$.paper_drawer_panel.responsiveWidth)) {
            this.$.paper_drawer_panel.togglePanel();
        } else {
            this.$.paper_drawer_panel.forceNarrow = !this.$.paper_drawer_panel.forceNarrow;
        }
    }

took from Polymer 1.0 paper-drawer-panel toggle is not working