<?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: how to stop  move  when  reshape graphic with sketchviewModel? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/1049349#M72656</link>
    <description>&lt;P&gt;I would actually recommend using &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move-start&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;to completely keep the geometry in place. Otherwise with &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move&lt;/FONT&gt;&lt;/STRONG&gt;, the user can actually move the geometry slightly. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move&lt;/FONT&gt;&lt;/STRONG&gt; is triggered right&amp;nbsp;&lt;EM&gt;after&lt;/EM&gt; the first action has been made. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move-start&lt;/FONT&gt;&lt;/STRONG&gt; allows us to interrupt any move action&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; it happens. It is a small difference, I know, but it may prevent geometry mismatches downstream and maintain shape integrity.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 20:39:03 GMT</pubDate>
    <dc:creator>JeremySwagger</dc:creator>
    <dc:date>2021-04-20T20:39:03Z</dc:date>
    <item>
      <title>how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48240#M4208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i&amp;nbsp; want to&amp;nbsp; remove&amp;nbsp;&amp;nbsp;&amp;nbsp; move event&amp;nbsp; when reshape&amp;nbsp; &amp;nbsp;graphic&amp;nbsp; with&amp;nbsp;&amp;nbsp;SketchViewModel ,how to do?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;when&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// Query all buffer features from the school buffers featurelayer&lt;/SPAN&gt;
 bufferLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;results&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 buffers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; results&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Add the boundary polygon and new lot polygon graphics&lt;/SPAN&gt;
 &lt;SPAN class="token function"&gt;addGraphics&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Create a new instance of sketchViewModel&lt;/SPAN&gt;
 sketchViewModel &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SketchViewModel&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 view&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 layer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; graphicsLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 updateOnGraphicClick&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
 defaultUpdateOptions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// set the default options for the update operations&lt;/SPAN&gt;
 toggleToolOnClick&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// only reshape operation will be enabled&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// Listen to sketchViewModel's update event to do&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// graphic reshape or move validation&lt;/SPAN&gt;
 sketchViewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"update"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"undo"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"redo"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; onGraphicUpdate&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;onGraphicUpdate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// get the graphic as it is being updated&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// check if the graphic is intersecting school buffers or is&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// still contained by the boundary polygon as the graphic is being updated&lt;/SPAN&gt;
 intersects &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;intersects&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;buffers&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 contains &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometryEngine&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;contains&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;boundaryPolygon&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// change the graphic symbol to valid or invalid symbol&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// depending the graphic location&lt;/SPAN&gt;
 graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;
 intersects &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;contains &lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; invalidSymbol &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; validSymbol&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// check if the update event's the toolEventInfo.type is move-stop or reshape-stop&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// then it means user finished moving or reshaping the graphic, call complete method.&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// this will change update event state to complete and we will check the validity of the graphic location.&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"reshape-stop"&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;contains &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;intersects&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;//sketchViewModel.complete();&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;state &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"cancel"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;state &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"complete"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// graphic moving or reshaping has been completed or cancelled&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// if the graphic is in an illegal spot, call sketchviewmodel's update method again&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// giving user a chance to correct the location of the graphic&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;contains &lt;SPAN class="operator token"&gt;||&lt;/SPAN&gt; intersects&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 sketchViewModel&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;update&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; tool&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"reshape"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"move-start"&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;// How to  stop  move  here?&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"move"&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;

 &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt;
 event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"move-stop"&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;

 &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
 &lt;SPAN class="punctuation token"&gt;}&l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t;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48240#M4208</guid>
      <dc:creator>yanli</dc:creator>
      <dc:date>2021-12-10T21:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48241#M4209</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;You can prevent the move operation for graphics by the cancel method on Sketch or SketchViewModel as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo &lt;SPAN class="operator token"&gt;&amp;amp;&amp;amp;&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;toolEventInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;includes&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"move"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  sketch&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;cancel&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48241#M4209</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-10T21:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48242#M4210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! it&amp;nbsp; works fine!&lt;/P&gt;&lt;P&gt;by the way,how to formate the&amp;nbsp;&amp;nbsp; javascript code in commutiy question like your reply code.&lt;/P&gt;&lt;P&gt;I'am newer for the commutiy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 01:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48242#M4210</guid>
      <dc:creator>yanli</dc:creator>
      <dc:date>2019-10-17T01:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48243#M4211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can format your code using Syntax Highlighter. See this discussion for more information: &lt;A href="https://community.esri.com/docs/DOC-8587-updated-content-text-editor"&gt;https://community.esri.com/docs/DOC-8587-updated-content-text-editor&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this highlighter is not available when responding to a message through your Inbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when your question is answered, click the "Mark Correct" button on that post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Oct 2019 13:41:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/48243#M4211</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2019-10-17T13:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/1049349#M72656</link>
      <description>&lt;P&gt;I would actually recommend using &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move-start&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;to completely keep the geometry in place. Otherwise with &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move&lt;/FONT&gt;&lt;/STRONG&gt;, the user can actually move the geometry slightly. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move&lt;/FONT&gt;&lt;/STRONG&gt; is triggered right&amp;nbsp;&lt;EM&gt;after&lt;/EM&gt; the first action has been made. &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;move-start&lt;/FONT&gt;&lt;/STRONG&gt; allows us to interrupt any move action&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; it happens. It is a small difference, I know, but it may prevent geometry mismatches downstream and maintain shape integrity.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 20:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/1049349#M72656</guid>
      <dc:creator>JeremySwagger</dc:creator>
      <dc:date>2021-04-20T20:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to stop  move  when  reshape graphic with sketchviewModel?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/1215468#M78790</link>
      <description>&lt;P&gt;This seems to be broken in version 2.24 I get the following error when calling &lt;EM&gt;sketch.cancel()&lt;/EM&gt; when type is &lt;EM&gt;"move-start"&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Reshape.js:formatted:479 

Uncaught TypeError: Cannot read properties of null (reading 'data')
    at d._onGraphicMoveStartCallback (Reshape.js:formatted:479:58)
    at Object.onGraphicMoveStart (Reshape.js:formatted:426:49)
    at f._dragHandler (VM6316 GraphicMover.js:15:308)
    at VM6316 GraphicMover.js:8:9
    at q._callback (VM6024:2298:475)
    at k._handleEvent (VM6024:2289:385)
    at Object.eventCallback (VM6024:2286:289)
    at z._continuePropagation (VM6024:2273:181)
    at z._doNewPropagation (VM6024:2272:223)
    at z._emitInputEvent (VM6024:2272:6)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Sep 2022 11:31:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-stop-move-when-reshape-graphic-with/m-p/1215468#M78790</guid>
      <dc:creator>Robert_van_Gilst</dc:creator>
      <dc:date>2022-09-23T11:31:00Z</dc:date>
    </item>
  </channel>
</rss>

