@eeacms/volto-arcgis-block 0.1.145 → 0.1.147

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,17 @@ 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.147](https://github.com/eea/volto-arcgis-block/compare/0.1.146...0.1.147) - 23 May 2023
8
+
9
+ #### :hammer_and_wrench: Others
10
+
11
+ - CLMS-2052 (fix): ran linting scripts [ujbolivar - [`ed77e14`](https://github.com/eea/volto-arcgis-block/commit/ed77e141141b7dd80d40c73a8d76f85930539380)]
12
+ - CLMS-2052 (fix): completed [ujbolivar - [`f2d3216`](https://github.com/eea/volto-arcgis-block/commit/f2d32161073255c238e77daa07805926c3643966)]
13
+ - CLMS-2052 (fix): ran linting scripts [ujbolivar - [`7b8dbb0`](https://github.com/eea/volto-arcgis-block/commit/7b8dbb0e408348aea4b046ae36f5fa964cea8b18)]
14
+ - CLMS-2052 (fix): title is hidden now. [ujbolivar - [`ef1d780`](https://github.com/eea/volto-arcgis-block/commit/ef1d780e81c164eac4cd2db1929ff3402a56efe1)]
15
+ - CLMS-2052 (fix): Images finally load. [ujbolivar - [`0a3c67f`](https://github.com/eea/volto-arcgis-block/commit/0a3c67f207a312167718f11bf8c1961aa3d8afbb)]
16
+ ### [0.1.146](https://github.com/eea/volto-arcgis-block/compare/0.1.145...0.1.146) - 22 May 2023
17
+
7
18
  ### [0.1.145](https://github.com/eea/volto-arcgis-block/compare/0.1.144...0.1.145) - 16 May 2023
8
19
 
9
20
  #### :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.145",
3
+ "version": "0.1.147",
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,36 @@ 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/@@images/image-283-df1c7b022cfd505c9bab4b4be08cd4f5.png';
40
+
41
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
42
+ 'none';
43
+ return;
44
+ } else if (img?.src?.includes('all_present_lc_b_pol')) {
45
+ img.src =
46
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/modular-reference-land-cover.png/@@images/image-312-a552fdf4af5b831c1af6cd039ad9ae2b.png';
47
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
48
+ 'none';
49
+ } else if (img?.src?.includes('all_lcc_a_pol')) {
50
+ img.src =
51
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/dichotomous-land-cover-change.png/@@images/image-324-83819bb107020e7fdab5764d199b000d.png';
52
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
53
+ 'none';
54
+ } else if (img?.src?.includes('all_lcc_b_pol')) {
55
+ img.src =
56
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/modular-land-cover-change.png/@@images/image-314-30a9e6f64333da441b830fc31875c011.png';
57
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
58
+ 'none';
59
+ } else if (img?.src?.includes('cop_klc')) {
60
+ img.src =
61
+ 'https://clmsdemo.devel6cph.eea.europa.eu/en/products/lclcc-hot-spots/static-legends/key-landscapes-for-conservation-borders.png/@@images/image-278-ebd9539bdc95d6a1028a01cd59efd680.png';
62
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
63
+ 'none';
64
+ } else if (img.style) {
65
+ img.parentNode.parentNode.parentNode.parentNode.firstElementChild.style.display =
66
+ 'none';
38
67
  img.style.display = 'none';
39
68
 
40
69
  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')) {
@@ -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);