<?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: Change the layout of cluster popup action buttons in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1305242#M81609</link>
    <description>&lt;P&gt;Anyone to tell me if it's possible or not please ?&lt;/P&gt;&lt;P&gt;If it's not I will post in JavaScript Maps SDK Ideas section.&lt;/P&gt;&lt;P&gt;I tried with the code below but it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.when(
          () =&amp;gt; view.popup?.viewModel?.active,
          //() =&amp;gt; view.popup?.viewModel?.visible,
          () =&amp;gt; {
            if (view.popup.selectedFeature.isAggregate) {
                
                const allActions = view.popup.viewModel.allActions.clone();
                
                const browseAction = allActions.at(4);
                allActions.reorder(browseAction, 0);
                
                const convexHullAction = allActions.at(2);
                allActions.reorder(convexHullAction, 4);
                
                const statisticsAction = allActions.at(1);
                allActions.reorder(statisticsAction, 2);
                
                //allActions.forEach((action) =&amp;gt; console.log(action.id));

                view.popup.actions.removeAll(); // DOES NOT WORK BECAUSE actions PROPERTY IS ALREADY EMPTY
                //view.popup.selectedFeature.layer.popupTemplate.actions.removeAll();
                
                //view.popup.viewModel.overwriteActions = true;
                //view.popup.viewModel.includeDefaultActions = false;
                
                view.popup.actions = allActions; // ACTIONS ARE DUPLICATED. WHAT IS WORSE IS THAT THEY DUPLICATE EVERY TIME POPUP IS ACTIVATED BECAUSE OF reactiveUtils.when(() =&amp;gt; view.popup?.viewModel?.active, ...)
                //view.popup.selectedFeature.layer.popupTemplate.actions = allActions;
            }
          }
        );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jul 2023 09:12:43 GMT</pubDate>
    <dc:creator>OlivierLefevre</dc:creator>
    <dc:date>2023-07-03T09:12:43Z</dc:date>
    <item>
      <title>Change the layout of cluster popup action buttons</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1303359#M81537</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In a code like &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=featurereduction-cluster-query" target="_self"&gt;this one&lt;/A&gt; is there any possiblity to change the layout of the action buttons like in the picture below ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="change order of cluster popup action buttons.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/74249i62F2030E9FA846D3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="change order of cluster popup action buttons.jpg" alt="change order of cluster popup action buttons.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 13:26:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1303359#M81537</guid>
      <dc:creator>OlivierLefevre</dc:creator>
      <dc:date>2023-06-27T13:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change the layout of cluster popup action buttons</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1305242#M81609</link>
      <description>&lt;P&gt;Anyone to tell me if it's possible or not please ?&lt;/P&gt;&lt;P&gt;If it's not I will post in JavaScript Maps SDK Ideas section.&lt;/P&gt;&lt;P&gt;I tried with the code below but it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;reactiveUtils.when(
          () =&amp;gt; view.popup?.viewModel?.active,
          //() =&amp;gt; view.popup?.viewModel?.visible,
          () =&amp;gt; {
            if (view.popup.selectedFeature.isAggregate) {
                
                const allActions = view.popup.viewModel.allActions.clone();
                
                const browseAction = allActions.at(4);
                allActions.reorder(browseAction, 0);
                
                const convexHullAction = allActions.at(2);
                allActions.reorder(convexHullAction, 4);
                
                const statisticsAction = allActions.at(1);
                allActions.reorder(statisticsAction, 2);
                
                //allActions.forEach((action) =&amp;gt; console.log(action.id));

                view.popup.actions.removeAll(); // DOES NOT WORK BECAUSE actions PROPERTY IS ALREADY EMPTY
                //view.popup.selectedFeature.layer.popupTemplate.actions.removeAll();
                
                //view.popup.viewModel.overwriteActions = true;
                //view.popup.viewModel.includeDefaultActions = false;
                
                view.popup.actions = allActions; // ACTIONS ARE DUPLICATED. WHAT IS WORSE IS THAT THEY DUPLICATE EVERY TIME POPUP IS ACTIVATED BECAUSE OF reactiveUtils.when(() =&amp;gt; view.popup?.viewModel?.active, ...)
                //view.popup.selectedFeature.layer.popupTemplate.actions = allActions;
            }
          }
        );&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 09:12:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1305242#M81609</guid>
      <dc:creator>OlivierLefevre</dc:creator>
      <dc:date>2023-07-03T09:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change the layout of cluster popup action buttons</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1307848#M81677</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;For those of you interested in this feature, you may find a solution &lt;A href="https://stackoverflow.com/questions/76618754/reordering-cluster-popup-action-buttons-arcgis-api-for-javascript-arcgis-map" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:38:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-layout-of-cluster-popup-action-buttons/m-p/1307848#M81677</guid>
      <dc:creator>OlivierLefevre</dc:creator>
      <dc:date>2023-07-13T08:38:23Z</dc:date>
    </item>
  </channel>
</rss>

