AnsweredAssumed Answered

close pane via BasemapToggle

Question asked by jay.kapalczynski on Mar 28, 2014
Latest reply on Mar 28, 2014 by MDriscoll-esristaff
I have a basemap toggle in my pane....I want to close the pane when the toggle is clicked.
I can do this with buttons no problem...but the toggle is giving me a problem




<div data-dojo-type="dijit/TitlePane" id="Tools"
data-dojo-props="title:'Tools', closable:false, open:false">
<div data-dojo-type="dijit/layout/ContentPane" style="width:200; ">
  <div class="toolbar"><span id="BasemapToggle" ></span></div>
                <div class="toolbar"><input type="button" class="myButton" id="button2" value="Finished" /></div>
</div>
</div>



   on(dom.byId("BasemapToggle"), "click", function () {
         // CLOSE THE PANE WHEN Clicked 
         dijit.byId("Tools").set('open',false); //Close
   })

   var toggle = new BasemapToggle({
      map: app.map,
      basemap: "satellite",
      className: "customToggle"
    }, "BasemapToggle");
    toggle.startup();




CLOSE THE BUTTONS LIKE THIS


on(dom.byId("button2"), "click", function () {
dijit.byId("Tools").set('open',false); //Close
})

Outcomes