<?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 Empty editor widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1275676#M80760</link>
    <description>&lt;P&gt;Heya,&lt;/P&gt;&lt;P&gt;Currently when Editor widget is loaded without any editable layers, it shows as blank (image attached).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aeseir_0-1680687700065.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67305iABCCB0BB8574D6CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aeseir_0-1680687700065.png" alt="Aeseir_0-1680687700065.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way so that it shows a custom message to advise user that its empty because no editable layers are present?&lt;/P&gt;&lt;P&gt;It ain't be best UX seeing a empty white box, you don't know what the go is.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 09:44:04 GMT</pubDate>
    <dc:creator>Aeseir</dc:creator>
    <dc:date>2023-04-05T09:44:04Z</dc:date>
    <item>
      <title>Empty editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1275676#M80760</link>
      <description>&lt;P&gt;Heya,&lt;/P&gt;&lt;P&gt;Currently when Editor widget is loaded without any editable layers, it shows as blank (image attached).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aeseir_0-1680687700065.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67305iABCCB0BB8574D6CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aeseir_0-1680687700065.png" alt="Aeseir_0-1680687700065.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way so that it shows a custom message to advise user that its empty because no editable layers are present?&lt;/P&gt;&lt;P&gt;It ain't be best UX seeing a empty white box, you don't know what the go is.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 09:44:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1275676#M80760</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-04-05T09:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Empty editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1275824#M80765</link>
      <description>&lt;P&gt;Making some text to appear instead of the empty box seems pretty tough (atleast for me). I would suggest to hide/don't add the widget if there are no editableLayers present in the loaded map.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(() =&amp;gt; { 
 view.map.loadAll().then(() =&amp;gt; {
  // Get all the editable layers in the loaded map
  console.log(view.map.editableLayers.length);

  // Only add the Editor widget is there is more than 1 editableLayers
  if (view.map.editableLayers.length &amp;gt; 0) {
   const editor = new Editor({
    view: view,
    layerInfos: [pointInfos, lineInfos, polyInfos]
   });
   // Add the widget to the view
   view.ui.add(editor, "top-right");
  }
 }); 
});&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 15:11:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1275824#M80765</guid>
      <dc:creator>RamaniGanason</dc:creator>
      <dc:date>2023-04-05T15:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Empty editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1276872#M80810</link>
      <description>&lt;P&gt;I've had it like that previously but then it created some confusion for end users that weren't well versed. They would rather it was empty but there then hidden. The ask is to see about adding content to it when empty, which seems to be leaning towards custom ui.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 09:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1276872#M80810</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-04-10T09:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Empty editor widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1359578#M83083</link>
      <description>&lt;P&gt;I ended up with a elegant solution that meets my needs. Sharing with community:&lt;/P&gt;&lt;P&gt;use the reactiveUtils to watch for editable layers. If there are none, hide the editor, alternative show it.&lt;/P&gt;&lt;P&gt;By default editor is hidden.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.watch(
        () =&amp;gt; this.view?.map.editableLayers.length,
        (count) =&amp;gt; toggleEditor() = count ? true : false
      );&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 10:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-editor-widget/m-p/1359578#M83083</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-12-12T10:14:35Z</dc:date>
    </item>
  </channel>
</rss>

