<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Directions dijit at 3.12 ActivateButton in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221284#M20537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's some code that should work - however its accessing a private property (_activateButton) and we don't typically recommend that people rely on undocumented properties.&amp;nbsp; We'll work on adding a public documented way to do this for 3.13 so if you add this to your code make a note to revisit it once 3.13 is live. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(directions._activateButton, "click", function(){&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(directions.active){&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //deactivate info windows. &lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 10:47:17 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2021-12-11T10:47:17Z</dc:date>
    <item>
      <title>Directions dijit at 3.12 ActivateButton</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221283#M20536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can anyone tell me what the ActivateButton is aliased as?&amp;nbsp; I'm referring to the same tool contained in the measurement dijit, where I disable my info window on click when one of the three measurement tools are active.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please forgive the lack of formatting here, I'm having to post this question from my cell phone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 17:31:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221283#M20536</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2014-12-30T17:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Directions dijit at 3.12 ActivateButton</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221284#M20537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's some code that should work - however its accessing a private property (_activateButton) and we don't typically recommend that people rely on undocumented properties.&amp;nbsp; We'll work on adding a public documented way to do this for 3.13 so if you add this to your code make a note to revisit it once 3.13 is live. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on(directions._activateButton, "click", function(){&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(directions.active){&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //deactivate info windows. &lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:47:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221284#M20537</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-11T10:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Directions dijit at 3.12 ActivateButton</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221285#M20538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kelly, sorry for the delayed response (my workplace has geonet access issues).&amp;nbsp; Yes the sample you provided will work, but not quite in the way I require, but it got me on the right track thanks very much.&amp;nbsp; Here's what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At startup, the default state is active where the activateButton is listening for mouse clicks, so I deactivate it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;directions.on("load", function(){
&amp;nbsp; directions.deactivate();
&amp;nbsp; });&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in order to disable the infoWindow I use a function that is hitched to the directions div on my index page:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function disablePopup() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(directions.active){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapMain.setInfoWindowOnClick(false);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mapMain.setInfoWindowOnClick(true);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//pass it to the index page
lang.setObject("disablePopup", disablePopup);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;div id="dirPane" data-dojo-type="dijit/layout/AccordionPane" data-dojo-props="title: 'Route By Address', selected:false" onclick="disablePopup();"&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where we control the popups based on the base widgets' active state when the div becomes active, which is essentially how I am handling the measure and draw tools as well when I need to prevent the infoWindow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For whatever reason I couldn't see same logic pattern here . . thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:47:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-dijit-at-3-12-activatebutton/m-p/221285#M20538</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2021-12-11T10:47:20Z</dc:date>
    </item>
  </channel>
</rss>

