<?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 Deactivate visibility of a html-element after activating the basemapgallery via Expand-button in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1513483#M85168</link>
    <description>&lt;P&gt;Daar users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my application I have a map-div and a "layer-selection-span":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   &amp;lt;div id="viewDiv"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;span id="layerToggle"&amp;gt;
          &amp;lt;input type="checkbox" id="kanalLyr" checked&amp;gt; Kanal
        &amp;lt;/span&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore I use an Expand to show the BaseMapGallery:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var basemapGallery = new BasemapGallery({
            view: view,
            source: initBasemap,
            container: document.createElement("div")
          });

          var bgExpand = new Expand({
            view: view,
            expandTooltip: "Basiskarten",
            content: basemapGallery
          });

          view.ui.add(bgExpand,{
              position: 'bottom-left',
          });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to find a solution that the&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;span&lt;/SPAN&gt; &lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"layerToggle"&lt;/SPAN&gt; is not visible anymore, if I open the BasemapGallery (and that it is visible, if I close the BaseMapGallery).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I tried things like:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;bgExpand.addEventListener(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;,event&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; ....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;bgExpand.on(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(event){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;....&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...but without success. Can anybody help please? How can I start a function after clicking on the Expand-Button?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 08:55:49 GMT</pubDate>
    <dc:creator>KaiBehncke</dc:creator>
    <dc:date>2024-08-01T08:55:49Z</dc:date>
    <item>
      <title>Deactivate visibility of a html-element after activating the basemapgallery via Expand-button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1513483#M85168</link>
      <description>&lt;P&gt;Daar users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my application I have a map-div and a "layer-selection-span":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   &amp;lt;div id="viewDiv"&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;span id="layerToggle"&amp;gt;
          &amp;lt;input type="checkbox" id="kanalLyr" checked&amp;gt; Kanal
        &amp;lt;/span&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore I use an Expand to show the BaseMapGallery:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var basemapGallery = new BasemapGallery({
            view: view,
            source: initBasemap,
            container: document.createElement("div")
          });

          var bgExpand = new Expand({
            view: view,
            expandTooltip: "Basiskarten",
            content: basemapGallery
          });

          view.ui.add(bgExpand,{
              position: 'bottom-left',
          });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to find a solution that the&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;span&lt;/SPAN&gt; &lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"layerToggle"&lt;/SPAN&gt; is not visible anymore, if I open the BasemapGallery (and that it is visible, if I close the BaseMapGallery).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I tried things like:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;bgExpand.addEventListener(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;,event&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; ....&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;or:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;bgExpand.on(&lt;/SPAN&gt;&lt;SPAN&gt;"click"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(event){&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;....&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;...but without success. Can anybody help please? How can I start a function after clicking on the Expand-Button?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 08:55:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1513483#M85168</guid>
      <dc:creator>KaiBehncke</dc:creator>
      <dc:date>2024-08-01T08:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate visibility of a html-element after activating the basemapgallery via Expand-button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1513671#M85169</link>
      <description>&lt;P&gt;Hi - you can watch the &lt;STRONG&gt;expanded&lt;/STRONG&gt; property on the Expand widget to know whether it is expanded/collapsed and then update the visibility of your layerToggle. Here's an example:&amp;nbsp;&lt;A href="https://codepen.io/annefitz/pen/gONmeMR?editors=100" target="_blank"&gt;https://codepen.io/annefitz/pen/gONmeMR?editors=100&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;bgExpand.watch("expanded", () =&amp;gt; {
   document.getElementById("layerToggle").style.display = bgExpand.expanded ? "none" : "block";
})&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 15:25:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1513671#M85169</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2024-08-01T15:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Deactivate visibility of a html-element after activating the basemapgallery via Expand-button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1514084#M85180</link>
      <description>&lt;P&gt;Thank you very much, Anne, good solution&amp;nbsp; !&lt;/P&gt;&lt;P&gt;Another solution for the described problem is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; reactiveUtils.watch(
    () =&amp;gt; [bgExpand.expanded], ([bgExpand]) =&amp;gt; {
       if (bgExpand==true) (document.getElementById("layerToggle").style.visibility="hidden");
       if (bgExpand==false)(document.getElementById("layerToggle").style.visibility="visible");
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2024 10:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/deactivate-visibility-of-a-html-element-after/m-p/1514084#M85180</guid>
      <dc:creator>KaiBehncke</dc:creator>
      <dc:date>2024-08-02T10:20:26Z</dc:date>
    </item>
  </channel>
</rss>

