@eeacms/volto-arcgis-block 0.1.136 → 0.1.137

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,7 +4,9 @@ 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.136](https://github.com/eea/volto-arcgis-block/compare/0.1.135...0.1.136) - 5 May 2023
7
+ ### [0.1.137](https://github.com/eea/volto-arcgis-block/compare/0.1.136...0.1.137) - 9 May 2023
8
+
9
+ ### [0.1.136](https://github.com/eea/volto-arcgis-block/compare/0.1.135...0.1.136) - 8 May 2023
8
10
 
9
11
  #### :hammer_and_wrench: Others
10
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.136",
3
+ "version": "0.1.137",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -2666,7 +2666,15 @@ class MenuWidget extends React.Component {
2666
2666
  this.saveOpacity(this.layers['pa_filter'], value / 100);
2667
2667
  } else {
2668
2668
  this.layers[layer].opacity = value / 100;
2669
- this.saveOpacity(this.layer, value / 100);
2669
+ this.saveOpacity(layer, value / 100);
2670
+ }
2671
+ if (
2672
+ this.map.findLayerById(layer) &&
2673
+ this.map.findLayerById(layer) !== null &&
2674
+ this.map.findLayerById(layer).opacity &&
2675
+ this.map.findLayerById(layer).opacity !== null
2676
+ ) {
2677
+ this.map.findLayerById(layer).opacity = value / 100;
2670
2678
  }
2671
2679
  document.querySelector(
2672
2680
  '.active-layer[layer-id="' + layer + '"] .active-layer-opacity',
@@ -2732,6 +2740,7 @@ class MenuWidget extends React.Component {
2732
2740
  * @param {*} id id from elem
2733
2741
  */
2734
2742
  eyeLayer(elem) {
2743
+ this.findCheckedDataset(elem);
2735
2744
  if (this.visibleLayers[elem.id][1] === 'eye') {
2736
2745
  this.layers[elem.id].visible = false;
2737
2746
  this.visibleLayers[elem.id] = ['fas', 'eye-slash'];
@@ -2781,6 +2790,23 @@ class MenuWidget extends React.Component {
2781
2790
  this.saveLayerOrder();
2782
2791
  this.checkInfoWidget();
2783
2792
  this.setState({});
2793
+ if (this.productTitle.includes('Global Dynamic Land Cover')) {
2794
+ if (this.visibleLayers[elem.id][1] === 'eye-slash') {
2795
+ this.map.findLayerById(elem.id).visible = false;
2796
+ } else {
2797
+ let layerOpacityes = JSON.parse(
2798
+ sessionStorage.getItem('layerOpacities'),
2799
+ );
2800
+ if (
2801
+ layerOpacityes &&
2802
+ layerOpacityes !== null &&
2803
+ layerOpacityes[elem.id] &&
2804
+ layerOpacityes[elem.id] !== null
2805
+ ) {
2806
+ this.map.findLayerById(elem.id).opacity = layerOpacityes[elem.id];
2807
+ }
2808
+ }
2809
+ }
2784
2810
  }
2785
2811
 
2786
2812
  /**
@@ -3161,7 +3187,7 @@ class MenuWidget extends React.Component {
3161
3187
  tabIndex="0"
3162
3188
  style={this.props.download ? { width: '33.333%' } : {}}
3163
3189
  >
3164
- Active on map
3190
+ Active layers
3165
3191
  </span>
3166
3192
  {this.props.download && (
3167
3193
  <span