Skip to content

Commit

Permalink
Merge pull request #764 from eea/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ujbolivar committed May 10, 2024
2 parents 31b6516 + b300afc commit aa830d6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [0.1.279](https://github.com/eea/volto-arcgis-block/compare/0.1.278...0.1.279) - 10 May 2024

#### :hammer_and_wrench: Others

- CLMS-2802 (chore): Deleted commented unused code for this ticket [Unai Bolivar - [`99ae470`](https://github.com/eea/volto-arcgis-block/commit/99ae470de8a63ee0d1c5c09f751ed589a7639765)]
- CLMS-2802 (bug): filtered hotspot layers swap index orders in map when dataset orders are changed in the active layers tab [Unai Bolivar - [`1b37250`](https://github.com/eea/volto-arcgis-block/commit/1b37250d4d23b34e1d944ebcd716ba0389692690)]
### [0.1.278](https://github.com/eea/volto-arcgis-block/compare/0.1.277...0.1.278) - 9 May 2024

#### :hammer_and_wrench: Others
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-arcgis-block",
"version": "0.1.278",
"version": "0.1.279",
"description": "volto-arcgis-block: Volto add-on",
"main": "src/index.js",
"author": "European Environment Agency: CodeSyntax",
Expand Down
23 changes: 22 additions & 1 deletion src/components/MapViewer/MenuWidget.jsx
Expand Up @@ -2873,10 +2873,31 @@ class MenuWidget extends React.Component {
layersReorder() {
let activeLayers = document.querySelectorAll('.active-layer');
let counter = activeLayers.length - 1;
let filterLayer;
activeLayers.forEach((item, index) => {
if (
this.props.hotspotData &&
this.props.hotspotData.filteredLayers &&
Object.keys(this.props.hotspotData.filteredLayers).length > 0
) {
Object.keys(this.props.hotspotData.activeLayers).forEach((key) => {
if (item.id.includes(key)) {
if (key.includes('all_lcc')) {
filterLayer = this.layers['lcc_filter'];
} else if (key.includes('all_present')) {
filterLayer = this.layers['lc_filter'];
}
}
this.map.reorder(filterLayer, index);
});
}
let order = counter - index;
item.setAttribute('layer-order', order);
this.layerReorder(this.layers[item.getAttribute('layer-id')], order);
if (filterLayer === undefined) {
this.layerReorder(this.layers[item.getAttribute('layer-id')], order);
} else {
this.layerReorder(filterLayer, order);
}
});
}

Expand Down

0 comments on commit aa830d6

Please sign in to comment.