@eeacms/volto-arcgis-block 0.1.54 → 0.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ ### [0.1.55](https://github.com/eea/volto-arcgis-block/compare/0.1.54...0.1.55) - 12 September 2022
8
+
7
9
  ### [0.1.54](https://github.com/eea/volto-arcgis-block/compare/0.1.53...0.1.54) - 9 September 2022
8
10
 
9
11
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.54",
3
+ "version": "0.1.55",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -508,9 +508,13 @@ class MenuWidget extends React.Component {
508
508
  dropdown
509
509
  .querySelector('.ccl-expandable__button')
510
510
  .setAttribute('aria-expanded', 'true');
511
- scrollPosition = document
511
+ let mapMenu = document
512
512
  .querySelector(elem + ' input')
513
- .closest('.map-menu-dataset').offsetTop;
513
+ .closest('.map-menu-dataset');
514
+ if (mapMenu) {
515
+ // mapMenu is null for Corine and was blocking.
516
+ scrollPosition = mapMenu.offsetTop;
517
+ }
514
518
  }
515
519
  document.querySelector('.panels').scrollTop = scrollPosition;
516
520
  }
@@ -1711,17 +1715,23 @@ class MenuWidget extends React.Component {
1711
1715
  for (let i = 0; i < layers.length; i++) {
1712
1716
  let elem = layers[i];
1713
1717
  let node = document.getElementById(elem);
1714
- node.dispatchEvent(event);
1715
- let dropdown = document
1716
- .getElementById(elem)
1717
- .closest('.map-menu-dropdown');
1718
- dropdown
1719
- .querySelector('.ccl-expandable__button')
1720
- .setAttribute('aria-expanded', 'true');
1721
- let scrollPosition = document
1722
- .getElementById(elem)
1723
- .closest('.map-menu-product-dropdown').offsetTop;
1724
- document.querySelector('.panels').scrollTop = scrollPosition;
1718
+
1719
+ if (node) {
1720
+ if (!node.checked) {
1721
+ // dont uncheck layers checked from URL param
1722
+ node.dispatchEvent(event);
1723
+ }
1724
+ let dropdown = document
1725
+ .getElementById(elem)
1726
+ .closest('.map-menu-dropdown');
1727
+ dropdown
1728
+ .querySelector('.ccl-expandable__button')
1729
+ .setAttribute('aria-expanded', 'true');
1730
+ let scrollPosition = document
1731
+ .getElementById(elem)
1732
+ .closest('.map-menu-product-dropdown').offsetTop;
1733
+ document.querySelector('.panels').scrollTop = scrollPosition;
1734
+ }
1725
1735
  }
1726
1736
  }
1727
1737
  }