<?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 remove the undo and redo button on a sketch widget? in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866523#M650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add these two css rules:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    &lt;SPAN class="selector token"&gt;.esri-sketch__section.esri-sketch__tool-section:last-of-type&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="selector token"&gt;.esri-sketch__section.esri-sketch__tool-section:nth-child(2)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="property token"&gt;border-right&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;/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 10:46:59 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T10:46:59Z</dc:date>
    <item>
      <title>How to remove the undo and redo button on a sketch widget?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866522#M649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does one remove the&amp;nbsp;undo and redo button on a sketch widget? Please see my code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt; &amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt; &amp;lt;meta&lt;BR /&gt; name="viewport"&lt;BR /&gt; content="initial-scale=1,maximum-scale=1,user-scalable=no"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;title&amp;gt;DEA GIS APPLICATION&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link&lt;BR /&gt; rel="stylesheet"&lt;BR /&gt; href="https://js.arcgis.com/4.12/esri/themes/light/main.css"&lt;BR /&gt; /&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://js.arcgis.com/4.12/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt; html,&lt;BR /&gt; body,&lt;BR /&gt; #viewDiv {&lt;BR /&gt; padding: 0;&lt;BR /&gt; margin: 0;&lt;BR /&gt; height: 100%;&lt;BR /&gt; width: 100%;&lt;BR /&gt; }&lt;BR /&gt; &amp;lt;/style&amp;gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; require([&lt;BR /&gt; "esri/widgets/Sketch",&lt;BR /&gt; "esri/Map",&lt;BR /&gt; "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/views/MapView"&lt;BR /&gt; ], function(Sketch, Map, GraphicsLayer, MapView) {&lt;BR /&gt; const layer = new GraphicsLayer();&lt;/P&gt;&lt;P&gt;const map = new Map({&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; layers: [layer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;const view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; map: map,&lt;BR /&gt; zoom: 5,&lt;BR /&gt; center: [90, 45]&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; var symbol = {&lt;BR /&gt; type: "simple-marker", // autocasts as new SimpleMarkerSymbol()&lt;BR /&gt; style: "circle",&lt;BR /&gt; color: "blue",&lt;BR /&gt; size: "8px", // pixels&lt;BR /&gt; outline: { // autocasts as new SimpleLineSymbol()&lt;BR /&gt; color: [ 255, 255, 0 ],&lt;BR /&gt; width: 1 // points&lt;BR /&gt; }&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;const sketch = new Sketch({&lt;BR /&gt; layer: layer,&lt;BR /&gt; view: view,&lt;BR /&gt; symbol: symbol,&lt;BR /&gt; availableCreateTools: ["point"]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;view.ui.add(sketch, "top-right");&lt;BR /&gt; &lt;BR /&gt; sketch.on('create', function (evt) {&lt;BR /&gt; if (view.zoom &amp;gt;= 11) {&lt;BR /&gt; // check if the create event's state has changed to complete indicating&lt;BR /&gt; // the graphic create operation is completed.&lt;BR /&gt; let gra = evt.graphic.clone();&lt;BR /&gt; evt.graphic.layer.removeAll();&lt;BR /&gt; gra.symbol.color = "blue";&lt;BR /&gt; layer.add(gra);&lt;BR /&gt; console.log("X = ", gra.geometry.x);&lt;BR /&gt; console.log("Y = ", gra.geometry.y);&lt;BR /&gt; } else {&lt;BR /&gt; alert("please zoom in");&lt;BR /&gt; evt.graphic.layer.remove(evt.graphic);&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 07:53:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866522#M649</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-03-09T07:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the undo and redo button on a sketch widget?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866523#M650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add these two css rules:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    &lt;SPAN class="selector token"&gt;.esri-sketch__section.esri-sketch__tool-section:last-of-type&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="selector token"&gt;.esri-sketch__section.esri-sketch__tool-section:nth-child(2)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="property token"&gt;border-right&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;/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 10:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866523#M650</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the undo and redo button on a sketch widget?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866524#M651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I add them inside the style or inside the sketch widget?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 08:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866524#M651</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-03-10T08:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove the undo and redo button on a sketch widget?</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866525#M652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Mar 2020 08:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/how-to-remove-the-undo-and-redo-button-on-a-sketch/m-p/866525#M652</guid>
      <dc:creator>SiyabongaKubeka</dc:creator>
      <dc:date>2020-03-10T08:35:22Z</dc:date>
    </item>
  </channel>
</rss>

