Hi,
In a code like this one is there any possiblity to change the layout of the action buttons like in the picture below ?
Solved! Go to Solution.
For those of you interested in this feature, you may find a solution here.
Anyone to tell me if it's possible or not please ?
If it's not I will post in JavaScript Maps SDK Ideas section.
I tried with the code below but it does not work.
reactiveUtils.when(
() => view.popup?.viewModel?.active,
//() => view.popup?.viewModel?.visible,
() => {
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) => 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(() => view.popup?.viewModel?.active, ...)
//view.popup.selectedFeature.layer.popupTemplate.actions = allActions;
}
}
);
For those of you interested in this feature, you may find a solution here.