@eeacms/volto-arcgis-block 0.1.144 → 0.1.146

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,13 @@ 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.146](https://github.com/eea/volto-arcgis-block/compare/0.1.145...0.1.146) - 22 May 2023
8
+
9
+ ### [0.1.145](https://github.com/eea/volto-arcgis-block/compare/0.1.144...0.1.145) - 16 May 2023
10
+
11
+ #### :hammer_and_wrench: Others
12
+
13
+ - CLMS-2146 (fix): Hotspot widget no longer opens up automatically when a hotpost layer is checked. Hotspot container button appears when selecting any of the 4 hotspot layers. Ran linting scripts. [ujbolivar - [`b726561`](https://github.com/eea/volto-arcgis-block/commit/b726561fa1784492441640521d1a68fcd3148d10)]
7
14
  ### [0.1.144](https://github.com/eea/volto-arcgis-block/compare/0.1.143...0.1.144) - 15 May 2023
8
15
 
9
16
  #### :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.144",
3
+ "version": "0.1.146",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -34,7 +34,23 @@ class LegendWidget extends React.Component {
34
34
 
35
35
  // If img src returns a broken link
36
36
  if (!(img.complete && img.naturalHeight !== 0)) {
37
- if (img.style) {
37
+ if (img?.src?.includes('all_present_lc_a_pol')) {
38
+ img.src =
39
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/dichotomous-reference-land-cover.png';
40
+ return;
41
+ } else if (img?.src?.includes('all_present_lc_b_pol')) {
42
+ img.src =
43
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/modular-reference-land-cover.png';
44
+ } else if (img?.src?.includes('all_lcc_a_pol')) {
45
+ img.src =
46
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/dichotomous-land-cover-change.png';
47
+ } else if (img?.src?.includes('all_lcc_b_pol')) {
48
+ img.src =
49
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/modular-land-cover-change.png';
50
+ } else if (img?.src?.includes('cop_klc')) {
51
+ img.src =
52
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/key-landscapes-for-conservation-borders.png';
53
+ } else if (img.style) {
38
54
  img.style.display = 'none';
39
55
 
40
56
  if (element.parentNode.querySelector('span')) return;
@@ -1596,7 +1596,7 @@ class MenuWidget extends React.Component {
1596
1596
  if (this.props.download) {
1597
1597
  setTimeout(() => {
1598
1598
  this.fullExtent(elem);
1599
- }, 1000);
1599
+ }, 2000);
1600
1600
  }
1601
1601
  if (this.layers['lc_filter'] || this.layers['lcc_filter']) {
1602
1602
  if (elem.id.includes('cop_klc')) {
@@ -1655,7 +1655,7 @@ class MenuWidget extends React.Component {
1655
1655
  delete this.timeLayers[elem.id];
1656
1656
  }
1657
1657
  this.updateCheckDataset(parentId);
1658
- this.toggleHotspotWidget();
1658
+ //this.toggleHotspotWidget();
1659
1659
  this.layersReorder();
1660
1660
  this.checkInfoWidget();
1661
1661
  // toggle custom legend for WMTS and TMS
@@ -1665,11 +1665,6 @@ class MenuWidget extends React.Component {
1665
1665
  ) {
1666
1666
  this.toggleCustomLegendItem(this.layers[elem.id]);
1667
1667
  }
1668
- // debugger;
1669
- // if (this.props.download) {
1670
- // this.fullExtent(elem);
1671
- // debugger;
1672
- // }
1673
1668
  // update DOM
1674
1669
  this.setState({});
1675
1670
  //this.activeLayersHandler(this.activeLayersAsArray);
@@ -3096,7 +3091,9 @@ class MenuWidget extends React.Component {
3096
3091
  if (
3097
3092
  /* layer.visible && */
3098
3093
  key.includes('all_present_lc_a_pol') ||
3099
- key.includes('all_lcc_a_pol')
3094
+ key.includes('all_present_lc_b_pol') ||
3095
+ key.includes('all_lcc_a_pol') ||
3096
+ key.includes('all_lcc_b_pol')
3100
3097
  ) {
3101
3098
  hotspotLayers.push(layer);
3102
3099
  }