<?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: deactivate  draw-end handler in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458987#M42402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I tried to use directely tb.remove() but I am getting the exception that remove is not defined. So after seaching a while in the debugger options I found the remove funtion you suggested in&amp;nbsp; onDrawEnd.after.remove(); &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jul 2014 15:33:07 GMT</pubDate>
    <dc:creator>maximcouton</dc:creator>
    <dc:date>2014-07-28T15:33:07Z</dc:date>
    <item>
      <title>deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458982#M42397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;He is my problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tb = new Draw(map);&lt;/P&gt;&lt;P&gt;tb.on("draw-end", lang.hitch(map, getAreaAndLength));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I later deactivate this handler ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wante something like :&amp;nbsp; tb.on("draw-end").set(null)&amp;nbsp; ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because I have to switch between two handlers,&lt;/P&gt;&lt;P&gt;IF set directely the second handler it still call the first&lt;/P&gt;&lt;P&gt;so finally , it calls the two handlers. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Maxim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 12:58:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458982#M42397</guid>
      <dc:creator>maximcouton</dc:creator>
      <dc:date>2014-07-28T12:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458983#M42398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maxim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If you setup a variable for the event then you can just use the remove function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var signal = tb.on("draw-end", lang.hitch(map, getAreaAndLength));&lt;/P&gt;&lt;P&gt;signal.remove();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 14:25:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458983#M42398</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-07-28T14:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458984#M42399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you should use once&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, 'Liberation Sans', FreeSans, sans-serif; font-size: 14px; background-color: #fffff1;"&gt;Incidentally, &lt;/SPAN&gt;&lt;CODE style="color: #333333; font-size: 14px; font-family: courier !important;"&gt;dojo/on&lt;/CODE&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, 'Liberation Sans', FreeSans, sans-serif; font-size: 14px; background-color: #fffff1;"&gt; includes a convenience method for doing exactly this: &lt;/SPAN&gt;&lt;CODE style="color: #333333; font-size: 14px; font-family: courier !important;"&gt;on.once&lt;/CODE&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, 'Liberation Sans', FreeSans, sans-serif; font-size: 14px; background-color: #fffff1;"&gt;. It accepts the same parameters as &lt;/SPAN&gt;&lt;CODE style="color: #333333; font-size: 14px; font-family: courier !important;"&gt;on&lt;/CODE&gt;&lt;SPAN style="color: #333333; font-family: Arial, Helvetica, 'Liberation Sans', FreeSans, sans-serif; font-size: 14px; background-color: #fffff1;"&gt;, but will automatically remove the handler once it is fired.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="http://dojotoolkit.org/documentation/tutorials/1.7/events/" title="http://dojotoolkit.org/documentation/tutorials/1.7/events/"&gt;Events with Dojo - The Dojo Toolkit&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:11:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458984#M42399</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2014-07-28T15:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458985#M42400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb.onDrawEnd.after.remove();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maxim,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:15:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458985#M42400</guid>
      <dc:creator>maximcouton</dc:creator>
      <dc:date>2014-07-28T15:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458986#M42401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maxim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As with many things there are a couple of ways to do it. Don't forget to mark people responses as helpful (if you think they are) using the actions menu link. Also if you think that your answer is the best than mark yours as the correct answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:20:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458986#M42401</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-07-28T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: deactivate  draw-end handler</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458987#M42402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I tried to use directely tb.remove() but I am getting the exception that remove is not defined. So after seaching a while in the debugger options I found the remove funtion you suggested in&amp;nbsp; onDrawEnd.after.remove(); &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jul 2014 15:33:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-draw-end-handler/m-p/458987#M42402</guid>
      <dc:creator>maximcouton</dc:creator>
      <dc:date>2014-07-28T15:33:07Z</dc:date>
    </item>
  </channel>
</rss>

