<?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: Add custom content to Expand widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252694#M80089</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/546199"&gt;@Aeseir&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;All you really need to do is give your div an id, then add your div as the content for the expand widget.&amp;nbsp; I made a quick &lt;A href="https://codepen.io/sagewall/pen/dyjjRMj" target="_self"&gt;code pen&lt;/A&gt; to show how this is done, but the relevant code snippet is below.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const expandContentDiv = document.getElementById("expandContentDiv");
const expand = new Expand({
  content: expandContentDiv,
  expanded: true
})
view.when(() =&amp;gt; {
  view.ui.add(expand, "top-right")
})&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 29 Jan 2023 13:26:25 GMT</pubDate>
    <dc:creator>Sage_Wall</dc:creator>
    <dc:date>2023-01-29T13:26:25Z</dc:date>
    <item>
      <title>Add custom content to Expand widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252677#M80087</link>
      <description>&lt;P&gt;I am trying to create content that is displayed when a Expand widget is activated for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;simple example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="bg-white"&amp;gt;

&amp;lt;p&amp;gt;Please select importance&amp;lt;/p&amp;gt;

&amp;lt;button (click)="trigger('high')"&amp;gt;High&amp;lt;/button&amp;gt;

&amp;lt;button (click)="trigger('mediumd')"&amp;gt;Medium&amp;lt;/button&amp;gt;

&amp;lt;button (click)="trigger('Low')"&amp;gt;Low&amp;lt;/button&amp;gt;

&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is in my component currently, I'd like to have it show up in a expanded widget, but not sure where to place the content (inside the div#map) and how to then reference it back to Expand widget.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Jan 2023 02:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252677#M80087</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-01-29T02:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom content to Expand widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252694#M80089</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/546199"&gt;@Aeseir&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;All you really need to do is give your div an id, then add your div as the content for the expand widget.&amp;nbsp; I made a quick &lt;A href="https://codepen.io/sagewall/pen/dyjjRMj" target="_self"&gt;code pen&lt;/A&gt; to show how this is done, but the relevant code snippet is below.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const expandContentDiv = document.getElementById("expandContentDiv");
const expand = new Expand({
  content: expandContentDiv,
  expanded: true
})
view.when(() =&amp;gt; {
  view.ui.add(expand, "top-right")
})&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 29 Jan 2023 13:26:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252694#M80089</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-01-29T13:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom content to Expand widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252801#M80096</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/507049"&gt;@Sage_Wall&lt;/a&gt;&amp;nbsp;, out of curiosity what if i wanted to just add a button from that list without expansion? Is there a way to use view.ui.add to add the custom button?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 10:17:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252801#M80096</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-01-30T10:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom content to Expand widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252958#M80105</link>
      <description>&lt;P&gt;Sure, you can add any HTML Element to the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#add" target="_self"&gt;view's ui&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this &lt;A href="https://codepen.io/sagewall/pen/xxJaVpO?editors=0011" target="_self"&gt;example&lt;/A&gt; I add a calcite-button (but a normal button would work the same) to log the view's extent when clicked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/Map", "esri/views/MapView"], (Map, MapView) =&amp;gt; {
  const map = new Map({
    basemap: "topo-vector"
  });

  const view = new MapView({
    container: "viewDiv",
    map: map,
    zoom: 10,
    center: [-104.5, 39.5]
  });

  const button = document.createElement("calcite-button");

  button.addEventListener("click", () =&amp;gt; {
    console.log(view.extent.toJSON());
  });

  button.innerText = "Log the view extent";

  view.when(() =&amp;gt; {
    view.ui.add(button, "top-right");
  });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 16:49:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1252958#M80105</guid>
      <dc:creator>Sage_Wall</dc:creator>
      <dc:date>2023-01-30T16:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom content to Expand widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1253199#M80115</link>
      <description>&lt;P&gt;Thank you, that helps with some of the other challenges I been facing.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 09:05:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-custom-content-to-expand-widget/m-p/1253199#M80115</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2023-01-31T09:05:35Z</dc:date>
    </item>
  </channel>
</rss>

