<?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: Sketch widget Delete event (4.10) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5910#M539</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no event fires in response to delete operation for sketch. We will look into it. In meantime, you can watch GraphicsLayer.graphics.length property as &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌ to respond to delete.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2019 17:46:13 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2019-02-06T17:46:13Z</dc:date>
    <item>
      <title>Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5906#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Sketch docs for 4.10 list 'create' 'redo' 'undo' and 'update' as the events it can fire.&lt;/P&gt;&lt;P&gt;(&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html"&gt;Sketch | API Reference | ArcGIS API for JavaScript 4.10&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;There's a trash-can icon that fires a 'update:cancelled' event - but that's the same event as hitting&amp;nbsp;escape during an edit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But ... in the javascript source, an undocumented 'reset' event is fired when the user deletes via the trash-icon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this simply missing from the docs, or a purposefully not-ready-for-consumption API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'd like to listen to this event,&amp;nbsp;and not worry about regression later on...)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 15:52:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5906#M535</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-02-05T15:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5907#M536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Reset is a documented &lt;STRONG&gt;method&lt;/STRONG&gt; and not an event.&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#reset" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#reset"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#reset&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 16:15:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5907#M536</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-02-05T16:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5908#M537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is true about the documentation, but I do mean events and I am asking/hoping the documentation needs fixing&lt;/P&gt;&lt;P&gt;There are corresponding events for all the programatic methods, with the notable exception of 'reset'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contrary to the docs, this code works and fixes my problem of knowing when delete has been pressed:&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-weight: normal; font-size: 14px;"&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// Warning: This was undocumented for ESRI 4.10's API, but was found with some JS hacking&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #6a9955;"&gt;// https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;drawingTools&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;on&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'reset'&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, (&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;e&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;log&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"%cReset"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;"background:cyan;"&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;e&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; );&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;mapGeoFilterManager&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;handleUpdatesFromUser&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;();&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;I just need to know if this is safe or likely to change, and in doing so, maybe drawing attention to&amp;nbsp;missing documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 16:27:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5908#M537</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-02-05T16:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5909#M538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is likely to change. The API team has stated in the past that they are not going to use many events in the 4.x API since they have been replaced with accessors. You just watch properties instead of the old event model they used in 3.x.&amp;nbsp; Maybe &lt;A href="https://community.esri.com/migrated-users/27489"&gt;Yann Cabon&lt;/A&gt;&amp;nbsp;can chime in here.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 16:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5909#M538</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-02-05T16:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5910#M539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no event fires in response to delete operation for sketch. We will look into it. In meantime, you can watch GraphicsLayer.graphics.length property as &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌ to respond to delete.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 17:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5910#M539</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2019-02-06T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5911#M540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/51882"&gt;Undral Batsukh&lt;/A&gt;‌, there IS an &lt;EM&gt;undocumented&lt;/EM&gt; event that fires in response to a delete.&amp;nbsp; See my previous reply with the code example (nb 'drawingTools' is of type 'Sketch').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is essentially - is this simply missing from the documentation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My follow-on question is then, can I rely on it being there in the future?&lt;/P&gt;&lt;P&gt;(&lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt; it looks like the newer simplified set of events to my eyes)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:21:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5911#M540</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-02-06T18:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5912#M541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it is not documented. Not meant be used publicly.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5912#M541</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2019-02-06T18:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5913#M542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Undral.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is suspicious and inconsistent by its absence (as the other actions are as pairs of events and methods except 'reset()') - what are the plans for the future releases of the API?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:40:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5913#M542</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-02-06T18:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch widget Delete event (4.10)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5914#M543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the benefit of anyone finding this thread, the reply that should have been:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ESRI: "Hi Nathan, yes it is an odd pattern.&amp;nbsp;&amp;nbsp;We have spoken to our developers and they have said it is an omission from the documentation, but for good reason.&amp;nbsp; They will be adding a 'delete' event in 4.11, which means the undocumented 'reset' event will no longer exist"&lt;/P&gt;&lt;P&gt;Nathan: "Thanks ESRI, great answer"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2019 11:33:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-delete-event-4-10/m-p/5914#M543</guid>
      <dc:creator>NathanSummers1</dc:creator>
      <dc:date>2019-07-25T11:33:45Z</dc:date>
    </item>
  </channel>
</rss>

