@eeacms/volto-arcgis-block 0.1.257 → 0.1.258
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.258](https://github.com/eea/volto-arcgis-block/compare/0.1.257...0.1.258) - 12 February 2024
|
|
8
|
+
|
|
7
9
|
### [0.1.257](https://github.com/eea/volto-arcgis-block/compare/0.1.256...0.1.257) - 7 February 2024
|
|
8
10
|
|
|
9
11
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -334,15 +334,21 @@ class BookmarkWidget extends React.Component {
|
|
|
334
334
|
}
|
|
335
335
|
this.map.layers.removeAll();
|
|
336
336
|
this.map.layers.add('bookmark');
|
|
337
|
+
let layerOpacities = {};
|
|
337
338
|
for (let index = 0; index < selectLayers.length; index++) {
|
|
338
339
|
if (selectOpacity[index]) {
|
|
339
340
|
this.layers[selectLayers[index]].opacity = selectOpacity[index];
|
|
341
|
+
layerOpacities[selectLayers[index]] = selectOpacity[index];
|
|
340
342
|
}
|
|
341
343
|
if (selectVisible[index] !== null) {
|
|
342
344
|
this.layers[selectLayers[index]].visible = selectVisible[index];
|
|
343
345
|
}
|
|
344
346
|
}
|
|
345
347
|
sessionStorage.setItem('checkedLayers', JSON.stringify(selectLayers));
|
|
348
|
+
sessionStorage.setItem(
|
|
349
|
+
'layerOpacities',
|
|
350
|
+
JSON.stringify(layerOpacities),
|
|
351
|
+
);
|
|
346
352
|
});
|
|
347
353
|
});
|
|
348
354
|
}
|
|
@@ -711,6 +711,20 @@ class MenuWidget extends React.Component {
|
|
|
711
711
|
});
|
|
712
712
|
this.layersReorder();
|
|
713
713
|
this.saveLayerOrder();
|
|
714
|
+
let elementOpacities = document.querySelectorAll(
|
|
715
|
+
'.active-layer-opacity',
|
|
716
|
+
);
|
|
717
|
+
let layerOpacities = JSON.parse(
|
|
718
|
+
sessionStorage.getItem('layerOpacities'),
|
|
719
|
+
);
|
|
720
|
+
elementOpacities.forEach((element) => {
|
|
721
|
+
let id = element.parentElement.parentElement.getAttribute(
|
|
722
|
+
'layer-id',
|
|
723
|
+
);
|
|
724
|
+
if (layerOpacities[id]) {
|
|
725
|
+
element.dataset.opacity = layerOpacities[id] * 100;
|
|
726
|
+
}
|
|
727
|
+
});
|
|
714
728
|
}
|
|
715
729
|
});
|
|
716
730
|
});
|
|
@@ -3075,24 +3089,20 @@ class MenuWidget extends React.Component {
|
|
|
3075
3089
|
* @param {*} e From the click event
|
|
3076
3090
|
*/
|
|
3077
3091
|
showOpacity(elem, e) {
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
)
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
document.querySelector('.opacity-panel').offsetHeight / 2;
|
|
3093
|
-
document.querySelector('.opacity-panel').style.top = top + 'px';
|
|
3094
|
-
document.querySelector('.opacity-slider input').dataset.layer = elem.id;
|
|
3095
|
-
}
|
|
3092
|
+
let opacity = e.currentTarget.dataset.opacity;
|
|
3093
|
+
document.querySelector('.opacity-slider input').value = opacity;
|
|
3094
|
+
document.querySelector('.opacity-panel').style.display = 'block';
|
|
3095
|
+
let left = e.currentTarget.offsetLeft + 48;
|
|
3096
|
+
document.querySelector('.opacity-panel').style.left = left + 'px';
|
|
3097
|
+
let top =
|
|
3098
|
+
document.querySelector('.tabs').offsetHeight +
|
|
3099
|
+
15 -
|
|
3100
|
+
document.querySelector('.panels').scrollTop +
|
|
3101
|
+
e.currentTarget.closest('.active-layer').offsetTop +
|
|
3102
|
+
e.currentTarget.closest('.active-layer').offsetHeight / 2 -
|
|
3103
|
+
document.querySelector('.opacity-panel').offsetHeight / 2;
|
|
3104
|
+
document.querySelector('.opacity-panel').style.top = top + 'px';
|
|
3105
|
+
document.querySelector('.opacity-slider input').dataset.layer = elem.id;
|
|
3096
3106
|
e.stopPropagation();
|
|
3097
3107
|
this.hideOnClickOutsideOpacity();
|
|
3098
3108
|
}
|