<?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 Is there a way to distinguish a 'normal' Sketch update event from one emitted because of duplication in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-distinguish-a-normal-sketch/m-p/1364166#M83199</link>
    <description>&lt;P&gt;I'm working on an implementation where a graphicsLayer can be edited using a Sketch widget. I ran into some issues when enabling the duplicate button, since my implementation relies on the sketch events&lt;/P&gt;&lt;PRE&gt;sketch.on('update', ...)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Now, when enabling the duplicate button, those events are indistinguishable from the events that would be called when aborting an update for a graphic and starting the update again.&lt;/P&gt;&lt;PRE&gt;{ // Event 1 emitted after duplicating&lt;BR /&gt;  "graphics": [ ... my graphics ...],&lt;BR /&gt;  "state": "complete",&lt;BR /&gt;  "aborted": true,&lt;BR /&gt;  "tool": "transform",&lt;BR /&gt;  "toolEventInfo": null,&lt;BR /&gt;  "type": "update"&lt;BR /&gt;},&lt;BR /&gt;{ // Event 2 emitted after duplicating&lt;BR /&gt;  "graphics": [... the new graphics with same attributes and geometry ...],&lt;BR /&gt;  "state": "start",&lt;BR /&gt;  "aborted": false,&lt;BR /&gt;  "tool": "transform",&lt;BR /&gt;  "toolEventInfo": null,&lt;BR /&gt;  "type": "update"&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;Does anyone have a suggestion for how to properly handle the duplicate action? I would've expected something like 'tool': 'duplicate' or 'type': 'create' event instead.&lt;/P&gt;</description>
    <pubDate>Sat, 23 Dec 2023 15:25:45 GMT</pubDate>
    <dc:creator>tlepel</dc:creator>
    <dc:date>2023-12-23T15:25:45Z</dc:date>
    <item>
      <title>Is there a way to distinguish a 'normal' Sketch update event from one emitted because of duplication</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-distinguish-a-normal-sketch/m-p/1364166#M83199</link>
      <description>&lt;P&gt;I'm working on an implementation where a graphicsLayer can be edited using a Sketch widget. I ran into some issues when enabling the duplicate button, since my implementation relies on the sketch events&lt;/P&gt;&lt;PRE&gt;sketch.on('update', ...)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Now, when enabling the duplicate button, those events are indistinguishable from the events that would be called when aborting an update for a graphic and starting the update again.&lt;/P&gt;&lt;PRE&gt;{ // Event 1 emitted after duplicating&lt;BR /&gt;  "graphics": [ ... my graphics ...],&lt;BR /&gt;  "state": "complete",&lt;BR /&gt;  "aborted": true,&lt;BR /&gt;  "tool": "transform",&lt;BR /&gt;  "toolEventInfo": null,&lt;BR /&gt;  "type": "update"&lt;BR /&gt;},&lt;BR /&gt;{ // Event 2 emitted after duplicating&lt;BR /&gt;  "graphics": [... the new graphics with same attributes and geometry ...],&lt;BR /&gt;  "state": "start",&lt;BR /&gt;  "aborted": false,&lt;BR /&gt;  "tool": "transform",&lt;BR /&gt;  "toolEventInfo": null,&lt;BR /&gt;  "type": "update"&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;Does anyone have a suggestion for how to properly handle the duplicate action? I would've expected something like 'tool': 'duplicate' or 'type': 'create' event instead.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 15:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-way-to-distinguish-a-normal-sketch/m-p/1364166#M83199</guid>
      <dc:creator>tlepel</dc:creator>
      <dc:date>2023-12-23T15:25:45Z</dc:date>
    </item>
  </channel>
</rss>

