<?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: Suspend map click event for identify when floating pane is open in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520740#M48539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's what I'm attempting with this, but my console.log never comes up, so I assume its not the right syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
registry.byId('floater_chart').on('hide', function () {
&amp;nbsp; console.log ("floater chart is hidden");
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm getting confused because most AMD has syntax like close, click, hide etc, not onClose, onClick, onHide.&amp;nbsp; I never have much luck digging through the dojo API reference and the documentation is pretty sparse.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:43:01 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2021-12-11T22:43:01Z</dc:date>
    <item>
      <title>Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520736#M48535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a map click to do an identify defined initially.&amp;nbsp; I want to be able to let the user click on my chart button to open a floating pane where I will generate a chart.&amp;nbsp; While the floating pane is open, I want the click event to run my generate chart function for the selected polygon instead of my standard identify.&amp;nbsp; I have multiple years of data for each county I want to show, coming out of multiple layers in my service.&amp;nbsp; The data is gathered through another identify that looks at all layers and formats the data the way the chart needs it. That part is figured out, believe or not.&amp;nbsp; I'm stuck on managing my identify click handlers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've found several threads that discuss switching between the measure tools and identify, but the solution seems to be having a listener on the measure events.&amp;nbsp; Nothing in those solutions helps me with this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried setting a variable when I defined the identify click event as &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;identifyHandler = map.on('click', identifyClickHandler);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a function to open the floating pane as &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;registry.byId('btnChart').on('click', function (){ &amp;nbsp; idFromClick = false; &amp;nbsp; chartClick = true; &amp;nbsp; domConstruct.empty("chartDiv"); &amp;nbsp; openFloatingPane('floater_chart'); &amp;nbsp; makeCountyChartClickHandler = map.on( "click", chartCountyByMapClick);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I get rid of identifyHandler?&amp;nbsp; At what point do I turn it back on again?&amp;nbsp; I'm not sure how what the event is for the floatingPane getting closed.&amp;nbsp; All the examples I found are still based on dojo.connect and dojo.disconnect.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also need to clear out the div that's in my floating pane in preparation to creating a new chart.&amp;nbsp; I'm trying to use &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;domConstruct.empty("chartDiv"); &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since my chart div is in my floating pane, it looks like the pane is getting destroyed, not closed, so I'm not sure when to empty it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The other thing that is happening is that the chart works OK the first time, but when I click a 2nd time on the same or different county, it's loading my chart over the top of it self multiple times.&amp;nbsp; I think it's doing it because the identify is firing more than once.&amp;nbsp; I'm sure it's because I haven't straightened out my click events yet, but it does seem wierd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's my best attempt to post my example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/schlot/HPDP7/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/schlot/HPDP7/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 18:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520736#M48535</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-06-19T18:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520737#M48536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sounds like you might want to try dojo/on#pausable&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.10/dojo/on.html#pausable" rel="nofollow noopener noreferrer" target="_blank"&gt;http://dojotoolkit.org/reference-guide/1.10/dojo/on.html#pausable&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is from a post a while ago&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/98389-Cancel-Identify-Task?p=353584&amp;amp;viewfull=1#post353584" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/98389-Cancel-Identify-Task?p=353584&amp;amp;viewfull=1#post353584&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It also looks like you are trying to toggle what function happens on the map click based on a certain state in your application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrote something up for that recently that might be useful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://gist.github.com/odoe/7e6b13cfac66e5cc99a5" rel="nofollow noopener noreferrer" target="_blank"&gt;https://gist.github.com/odoe/7e6b13cfac66e5cc99a5&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can basically use it like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var handler = on.switchable(map, 'click', function1, function2); //defaults to function1 first
...//do stuff
handler.toggle(); // now will launch function2 when event occurs
...//do more stuff
handler.toggle(); // returns to using function1 to handle events&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520737#M48536</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T22:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520738#M48537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The function for opening the floating pane now includes a pause for the identify click handler and turns on the handler for the 'make chart' click event.&amp;nbsp; When I close the floating pane, I don't know what event I'm listening for, so I can't do the reverse:&amp;nbsp; turn on the identify and turn off the chart making.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 19:57:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520738#M48537</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-06-20T19:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520739#M48538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you listen for the FloatingPane's onClose or onHide event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520739#M48538</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-06-20T20:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520740#M48539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's what I'm attempting with this, but my console.log never comes up, so I assume its not the right syntax.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
registry.byId('floater_chart').on('hide', function () {
&amp;nbsp; console.log ("floater chart is hidden");
});
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm getting confused because most AMD has syntax like close, click, hide etc, not onClose, onClick, onHide.&amp;nbsp; I never have much luck digging through the dojo API reference and the documentation is pretty sparse.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:43:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520740#M48539</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-11T22:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520741#M48540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since FloatingPane is part of dojox, it may not be an Evented module yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You could go back to using dojo/connect or I think the preferred way to handle these modules is using dojo/aspect&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://dojotoolkit.org/reference-guide/1.10/dojo/aspect.html"&gt;http://dojotoolkit.org/reference-guide/1.10/dojo/aspect.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;aspect.after(floatingPane, 'onHide', handlerFunction);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520741#M48540</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2014-06-20T20:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520742#M48541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good call, Rene. I tried both&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;aspect.after(fpVideo, 'onHide', function () { console.log("onHide"); }); aspect.after(fpVideo, 'hide', function () { console.log("hide"); });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and only got a "hide" in the console.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 20:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520742#M48541</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-06-20T20:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Suspend map click event for identify when floating pane is open</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520743#M48542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rene, you're right about trying aspect and Ken you're right that it wanted 'hide' and not 'onHide'.&amp;nbsp; It's working!&amp;nbsp; I've updated my jsFiddle.&amp;nbsp;&amp;nbsp;&amp;nbsp; That may turn out to be a good generic solution for me.&amp;nbsp; As the requests for 'can you make it do this' grow larger, I always struggle to find a place to put everything.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 13:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/suspend-map-click-event-for-identify-when-floating/m-p/520743#M48542</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-06-23T13:40:14Z</dc:date>
    </item>
  </channel>
</rss>

