<?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 Disable Reshape in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695969#M64803</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah thank you Robert,&amp;nbsp;using this (hiding the button) combined&amp;nbsp;with the above defaultUpdateOptions: {toggleOnClick: false} so the user cannot switch to that tool by double clicking, disables it completely, solved my problem, cheers &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Apr 2020 15:25:45 GMT</pubDate>
    <dc:creator>JoelGoransson</dc:creator>
    <dc:date>2020-04-24T15:25:45Z</dc:date>
    <item>
      <title>Sketch Widget Disable Reshape</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695965#M64799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, novice programmer here tasked with making a project, I'm a little out of my depth. I'm using this plugin to allow a user to select a basic rectangular area on a map, I found that the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#availableCreateTools"&gt;Sketch widget&lt;/A&gt;&amp;nbsp;is pretty much exactly what I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a sample of it here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sketch-geometries/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/sketch-geometries/index.html"&gt;Sketch widget | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I only want a basic rectangle I wanted to disable the other options of drawing, I found I could do this with this "availableCreateTools: ["rectangle"]" code but now I still have the issue of the reshape tool being able to modify the rectangle into complex shapes, and the transform tool being able to rotate the rectangle (which I do not want either).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I disable both of these behaviors? (Most importantly the reshape one first).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my code pen here: &lt;A class="link-titled" href="https://codepen.io/issun/pen/BaopmQV?editors=1010" title="https://codepen.io/issun/pen/BaopmQV?editors=1010"&gt;https://codepen.io/issun/pen/BaopmQV?editors=1010&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for all your answers!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE 1: Figured out how to disable rotation, by adding the line "sketch.defaultUpdateOptions.enableRotation = false;" before adding sketch to the view. Now I just need help with disabling the reshape tool &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 08:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695965#M64799</guid>
      <dc:creator>JoelGoransson</dc:creator>
      <dc:date>2020-04-23T08:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Disable Reshape</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695966#M64800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sure just add this:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;defaultUpdateOptions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;enableRotation&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&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="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 13:01:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695966#M64800</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-04-23T13:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Disable Reshape</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695967#M64801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, this is much better than me adding a line after the constructor, but the "toggleToolOnClick" property does not disable the reshape tool, it only disables switching between the transform and reshape tools when clicking more than once on a created shape.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've updated my codepen with the changes you suggested, see here:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/issun/pen/BaopmQV?editors=1010" title="https://codepen.io/issun/pen/BaopmQV?editors=1010"&gt;https://codepen.io/issun/pen/BaopmQV?editors=1010&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 02:05:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695967#M64801</guid>
      <dc:creator>JoelGoransson</dc:creator>
      <dc:date>2020-04-24T02:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Disable Reshape</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695968#M64802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;So&amp;nbsp;Add this css rule to prevent the reshape button from showing.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="selector token"&gt;button[title="Reshape"]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  &lt;SPAN class="property token"&gt;display&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; none&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>Sun, 12 Dec 2021 05:17:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695968#M64802</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T05:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch Widget Disable Reshape</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695969#M64803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah thank you Robert,&amp;nbsp;using this (hiding the button) combined&amp;nbsp;with the above defaultUpdateOptions: {toggleOnClick: false} so the user cannot switch to that tool by double clicking, disables it completely, solved my problem, cheers &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 15:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sketch-widget-disable-reshape/m-p/695969#M64803</guid>
      <dc:creator>JoelGoransson</dc:creator>
      <dc:date>2020-04-24T15:25:45Z</dc:date>
    </item>
  </channel>
</rss>

