@eeacms/volto-arcgis-block 0.1.413 → 0.1.415
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,8 +4,23 @@ 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.415](https://github.com/eea/volto-arcgis-block/compare/0.1.414...0.1.415) - 3 December 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- (bug): In the TOC menu, when a level is selected, the lower level is now displayed [Unai Bolivar - [`ec66304`](https://github.com/eea/volto-arcgis-block/commit/ec6630453964d3f82c5277ddf43a976c3b1c72c3)]
|
|
12
|
+
### [0.1.414](https://github.com/eea/volto-arcgis-block/compare/0.1.413...0.1.414) - 1 December 2025
|
|
13
|
+
|
|
14
|
+
#### :hammer_and_wrench: Others
|
|
15
|
+
|
|
16
|
+
- (bug): Refactor setOpacity to update localstorage correctly [Unai Bolivar - [`b285628`](https://github.com/eea/volto-arcgis-block/commit/b285628caf26c91bbe4f94db48e7406e36f906a6)]
|
|
17
|
+
- (bug): Refactor menu deselection updating the map view [Unai Bolivar - [`01c3b52`](https://github.com/eea/volto-arcgis-block/commit/01c3b520d5679d67b8459ac68a9ca4d14522e67d)]
|
|
18
|
+
- (bug): Adding peesistence to extent mechanisms for HRVPP datasets. Unstable. [Unai Bolivar - [`c5c491f`](https://github.com/eea/volto-arcgis-block/commit/c5c491f1c46ce62ccfe90830c3949db2bb2d4831)]
|
|
7
19
|
### [0.1.413](https://github.com/eea/volto-arcgis-block/compare/0.1.412...0.1.413) - 27 November 2025
|
|
8
20
|
|
|
21
|
+
#### :hammer_and_wrench: Others
|
|
22
|
+
|
|
23
|
+
- Merge pull request #1068 from eea/develop [Unai Bolivar - [`cf8a1b1`](https://github.com/eea/volto-arcgis-block/commit/cf8a1b1f0c90dba13ff68f971e01690c52d57453)]
|
|
9
24
|
### [0.1.412](https://github.com/eea/volto-arcgis-block/compare/0.1.411...0.1.412) - 26 November 2025
|
|
10
25
|
|
|
11
26
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -463,6 +463,7 @@ class MenuWidget extends React.Component {
|
|
|
463
463
|
this.xml = null;
|
|
464
464
|
this.dataBBox = null;
|
|
465
465
|
this.extentInitiated = false;
|
|
466
|
+
this.extentCenter = null;
|
|
466
467
|
this.hotspotLayerIds = [];
|
|
467
468
|
this.getHotspotLayerIds = this.getHotspotLayerIds.bind(this);
|
|
468
469
|
this.prepareHotspotLayers = this.prepareHotspotLayers.bind(this);
|
|
@@ -476,7 +477,11 @@ class MenuWidget extends React.Component {
|
|
|
476
477
|
this.view.watch('stationary', (isStationary) => {
|
|
477
478
|
let snowAndIceInSessionStorage = sessionStorage.getItem('snowAndIce');
|
|
478
479
|
let node;
|
|
480
|
+
if (this.view && this.view.center) {
|
|
481
|
+
this.extentCenter = { x: this.view.center.x, y: this.view.center.y };
|
|
482
|
+
}
|
|
479
483
|
if (isStationary) {
|
|
484
|
+
this.extentInitiated = false;
|
|
480
485
|
let zoom = this.view.get('zoom');
|
|
481
486
|
if (this.props.download) {
|
|
482
487
|
node = document.querySelector('.zoom-in-message-dataset');
|
|
@@ -2892,6 +2897,12 @@ class MenuWidget extends React.Component {
|
|
|
2892
2897
|
// }, 2000);
|
|
2893
2898
|
}
|
|
2894
2899
|
}
|
|
2900
|
+
if (
|
|
2901
|
+
this.layers[elem.id].DatasetId === '65f8eded11d94a1ba5540ceecaddd4e6' ||
|
|
2902
|
+
this.layers[elem.id].DatasetId === '40e056d02eed4c1fb2040cf0f06823df'
|
|
2903
|
+
) {
|
|
2904
|
+
this.fullExtentDataset(elem);
|
|
2905
|
+
}
|
|
2895
2906
|
if (
|
|
2896
2907
|
(elem.id.includes('all_lcc') || elem.id.includes('all_present')) &&
|
|
2897
2908
|
(this.layers['lc_filter'] || this.layers['lcc_filter']) &&
|
|
@@ -3028,6 +3039,7 @@ class MenuWidget extends React.Component {
|
|
|
3028
3039
|
}
|
|
3029
3040
|
} catch (e) {}
|
|
3030
3041
|
} else {
|
|
3042
|
+
this.extentInitiated = false;
|
|
3031
3043
|
sessionStorage.removeItem('downloadButtonClicked');
|
|
3032
3044
|
sessionStorage.removeItem('timeSliderTag');
|
|
3033
3045
|
this.deleteCheckedLayer(elem.id);
|
|
@@ -3280,6 +3292,23 @@ class MenuWidget extends React.Component {
|
|
|
3280
3292
|
let splitdefCheck = layerdef.split(',');
|
|
3281
3293
|
let layerChecks = [];
|
|
3282
3294
|
let selector = [];
|
|
3295
|
+
if (value) {
|
|
3296
|
+
let productDropdown = e.closest('.map-menu-product-dropdown');
|
|
3297
|
+
let datasetDropdown = e.closest('.map-menu-dropdown');
|
|
3298
|
+
let familyDropdown = e.closest('.map-menu-family-dropdown');
|
|
3299
|
+
if (productDropdown) {
|
|
3300
|
+
let btn = productDropdown.querySelector('.ccl-expandable__button');
|
|
3301
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3302
|
+
}
|
|
3303
|
+
if (familyDropdown) {
|
|
3304
|
+
let btn = familyDropdown.querySelector('.ccl-expandable__button');
|
|
3305
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3306
|
+
}
|
|
3307
|
+
if (datasetDropdown) {
|
|
3308
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3309
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3283
3312
|
if (value) {
|
|
3284
3313
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3285
3314
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
@@ -3305,6 +3334,29 @@ class MenuWidget extends React.Component {
|
|
|
3305
3334
|
this.toggleLayer(element);
|
|
3306
3335
|
}
|
|
3307
3336
|
});
|
|
3337
|
+
if (!value) {
|
|
3338
|
+
let filterIds = ['lcc_filter', 'lc_filter', 'klc_filter', 'pa_filter'];
|
|
3339
|
+
for (let i = 0; i < filterIds.length; i++) {
|
|
3340
|
+
let fid = filterIds[i];
|
|
3341
|
+
if (this.layers && this.layers[fid]) {
|
|
3342
|
+
this.deleteFilteredLayer(fid);
|
|
3343
|
+
let mapLayer = this.map && this.map.findLayerById(fid);
|
|
3344
|
+
if (mapLayer) {
|
|
3345
|
+
if (mapLayer.type && mapLayer.type !== 'base-tile') {
|
|
3346
|
+
mapLayer.clear();
|
|
3347
|
+
}
|
|
3348
|
+
mapLayer.destroy();
|
|
3349
|
+
this.map.remove(mapLayer);
|
|
3350
|
+
}
|
|
3351
|
+
if (this.activeLayersJSON && this.activeLayersJSON[fid])
|
|
3352
|
+
delete this.activeLayersJSON[fid];
|
|
3353
|
+
if (this.visibleLayers && this.visibleLayers[fid])
|
|
3354
|
+
delete this.visibleLayers[fid];
|
|
3355
|
+
if (this.timeLayers && this.timeLayers[fid])
|
|
3356
|
+
delete this.timeLayers[fid];
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
}
|
|
3308
3360
|
}
|
|
3309
3361
|
|
|
3310
3362
|
/**
|
|
@@ -3321,9 +3373,21 @@ class MenuWidget extends React.Component {
|
|
|
3321
3373
|
let selector = [];
|
|
3322
3374
|
|
|
3323
3375
|
if (value) {
|
|
3376
|
+
let productContainer = document.querySelector('[productid="' + id + '"]');
|
|
3377
|
+
if (productContainer) {
|
|
3378
|
+
let btn = productContainer.querySelector('.ccl-expandable__button');
|
|
3379
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3380
|
+
}
|
|
3324
3381
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3325
3382
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
3326
3383
|
datasetChecks.push(selector);
|
|
3384
|
+
if (selector) {
|
|
3385
|
+
let datasetDropdown = selector.closest('.map-menu-dropdown');
|
|
3386
|
+
if (datasetDropdown) {
|
|
3387
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3388
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3389
|
+
}
|
|
3390
|
+
}
|
|
3327
3391
|
}
|
|
3328
3392
|
} else {
|
|
3329
3393
|
datasetChecks = document.querySelectorAll(`[parentid=${id}]`);
|
|
@@ -3345,9 +3409,21 @@ class MenuWidget extends React.Component {
|
|
|
3345
3409
|
let selector = [];
|
|
3346
3410
|
|
|
3347
3411
|
if (value) {
|
|
3412
|
+
let familyContainer = document.querySelector('[productid="' + id + '"]');
|
|
3413
|
+
if (familyContainer) {
|
|
3414
|
+
let btn = familyContainer.querySelector('.ccl-expandable__button');
|
|
3415
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3416
|
+
}
|
|
3348
3417
|
for (let i = 0; i < splitdefCheck.length; i++) {
|
|
3349
3418
|
selector = document.querySelector(`[id="${splitdefCheck[i]}"]`);
|
|
3350
3419
|
datasetChecks.push(selector);
|
|
3420
|
+
if (selector) {
|
|
3421
|
+
let datasetDropdown = selector.closest('.map-menu-dropdown');
|
|
3422
|
+
if (datasetDropdown) {
|
|
3423
|
+
let btn = datasetDropdown.querySelector('.ccl-expandable__button');
|
|
3424
|
+
if (btn) btn.setAttribute('aria-expanded', 'true');
|
|
3425
|
+
}
|
|
3426
|
+
}
|
|
3351
3427
|
}
|
|
3352
3428
|
} else {
|
|
3353
3429
|
datasetChecks = document.querySelectorAll(`[parentid=${id}]`);
|
|
@@ -4040,8 +4116,9 @@ class MenuWidget extends React.Component {
|
|
|
4040
4116
|
});
|
|
4041
4117
|
}
|
|
4042
4118
|
if (
|
|
4043
|
-
this.
|
|
4044
|
-
this.layers[elem.id].DatasetId === '
|
|
4119
|
+
this.extentInitiated === false &&
|
|
4120
|
+
(this.layers[elem.id].DatasetId === '65f8eded11d94a1ba5540ceecaddd4e6' ||
|
|
4121
|
+
this.layers[elem.id].DatasetId === '40e056d02eed4c1fb2040cf0f06823df')
|
|
4045
4122
|
) {
|
|
4046
4123
|
let myExtent = new Extent({
|
|
4047
4124
|
xmin: -13478905.5678019,
|
|
@@ -4050,7 +4127,20 @@ class MenuWidget extends React.Component {
|
|
|
4050
4127
|
ymax: 11175665.272476234,
|
|
4051
4128
|
spatialReference: 3857,
|
|
4052
4129
|
});
|
|
4053
|
-
|
|
4130
|
+
const targetCenter = myExtent.center;
|
|
4131
|
+
if (this.extentCenter) {
|
|
4132
|
+
const epsilon = 1e-3;
|
|
4133
|
+
const sameStoredCenter =
|
|
4134
|
+
Math.abs(this.extentCenter.x - targetCenter.x) < epsilon &&
|
|
4135
|
+
Math.abs(this.extentCenter.y - targetCenter.y) < epsilon;
|
|
4136
|
+
if (sameStoredCenter) {
|
|
4137
|
+
this.extentInitiated = true;
|
|
4138
|
+
return;
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
this.view.goTo({ center: targetCenter, zoom: 3 });
|
|
4142
|
+
this.extentCenter = { x: targetCenter.x, y: targetCenter.y };
|
|
4143
|
+
this.extentInitiated = true;
|
|
4054
4144
|
} else {
|
|
4055
4145
|
this.view.goTo(myExtent);
|
|
4056
4146
|
}
|
|
@@ -4287,8 +4377,10 @@ class MenuWidget extends React.Component {
|
|
|
4287
4377
|
ymax: firstLayer.ymax,
|
|
4288
4378
|
});
|
|
4289
4379
|
if (
|
|
4290
|
-
this.
|
|
4291
|
-
this.layers[elem.id].DatasetId ===
|
|
4380
|
+
this.extentInitiated === false &&
|
|
4381
|
+
(this.layers[elem.id].DatasetId ===
|
|
4382
|
+
'65f8eded11d94a1ba5540ceecaddd4e6' ||
|
|
4383
|
+
this.layers[elem.id].DatasetId === '40e056d02eed4c1fb2040cf0f06823df')
|
|
4292
4384
|
) {
|
|
4293
4385
|
let myExtent = new Extent({
|
|
4294
4386
|
xmin: -13478905.5678019,
|
|
@@ -4297,7 +4389,26 @@ class MenuWidget extends React.Component {
|
|
|
4297
4389
|
ymax: 11175665.272476234,
|
|
4298
4390
|
spatialReference: 3857,
|
|
4299
4391
|
});
|
|
4300
|
-
|
|
4392
|
+
const targetCenter = myExtent.center;
|
|
4393
|
+
if (this.extentCenter) {
|
|
4394
|
+
const epsilon = 1e-3;
|
|
4395
|
+
const sameStoredCenter =
|
|
4396
|
+
Math.abs(this.extentCenter.x - targetCenter.x) < epsilon &&
|
|
4397
|
+
Math.abs(this.extentCenter.y - targetCenter.y) < epsilon;
|
|
4398
|
+
if (sameStoredCenter) {
|
|
4399
|
+
if (this.toggleHotspotWidget.view.zoom !== 3) {
|
|
4400
|
+
this.view.zoom = 3;
|
|
4401
|
+
this.setState({}); // Force re-render
|
|
4402
|
+
return;
|
|
4403
|
+
} else {
|
|
4404
|
+
this.extentInitiated = true;
|
|
4405
|
+
return;
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4409
|
+
this.view.goTo({ center: targetCenter, zoom: 3 });
|
|
4410
|
+
this.extentCenter = { x: targetCenter.x, y: targetCenter.y };
|
|
4411
|
+
this.extentInitiated = true;
|
|
4301
4412
|
} else {
|
|
4302
4413
|
this.view.goTo(myExtent);
|
|
4303
4414
|
}
|
|
@@ -4887,13 +4998,61 @@ class MenuWidget extends React.Component {
|
|
|
4887
4998
|
*/
|
|
4888
4999
|
saveOpacity(layer, value) {
|
|
4889
5000
|
if (this.props.download) return;
|
|
5001
|
+
|
|
5002
|
+
// Resolve layer id from string or layer object
|
|
5003
|
+
let layerId = typeof layer === 'string' ? layer : null;
|
|
5004
|
+
if (!layerId && layer && typeof layer === 'object') {
|
|
5005
|
+
let lid = null;
|
|
5006
|
+
if (layer.id) {
|
|
5007
|
+
lid = layer.id;
|
|
5008
|
+
} else if (layer.LayerId) {
|
|
5009
|
+
lid = layer.LayerId;
|
|
5010
|
+
} else if (layer.layer && layer.layer.id) {
|
|
5011
|
+
lid = layer.layer.id;
|
|
5012
|
+
}
|
|
5013
|
+
layerId = lid;
|
|
5014
|
+
}
|
|
5015
|
+
if (!layerId) return;
|
|
5016
|
+
|
|
5017
|
+
// Update sessionStorage
|
|
4890
5018
|
let layerOpacities = JSON.parse(sessionStorage.getItem('layerOpacities'));
|
|
4891
5019
|
if (layerOpacities === null) {
|
|
4892
5020
|
layerOpacities = {};
|
|
4893
5021
|
}
|
|
4894
|
-
layerOpacities[
|
|
5022
|
+
layerOpacities[layerId] = value;
|
|
4895
5023
|
sessionStorage.setItem('layerOpacities', JSON.stringify(layerOpacities));
|
|
4896
5024
|
|
|
5025
|
+
// Persist basic layer information (metadata + current opacity + visibility)
|
|
5026
|
+
try {
|
|
5027
|
+
let layersInfo = JSON.parse(sessionStorage.getItem('layersInfo'));
|
|
5028
|
+
if (layersInfo === null) layersInfo = {};
|
|
5029
|
+
if (this.layers && this.layers[layerId]) {
|
|
5030
|
+
const l = this.layers[layerId];
|
|
5031
|
+
layersInfo[layerId] = {
|
|
5032
|
+
id: layerId,
|
|
5033
|
+
title: l.title || l.DatasetTitle || l.LayerTitle || '',
|
|
5034
|
+
DatasetId: l.DatasetId || '',
|
|
5035
|
+
ViewService: l.ViewService || l.url || '',
|
|
5036
|
+
type: l.type || '',
|
|
5037
|
+
opacity: value,
|
|
5038
|
+
visible: !!l.visible,
|
|
5039
|
+
};
|
|
5040
|
+
sessionStorage.setItem('layersInfo', JSON.stringify(layersInfo));
|
|
5041
|
+
}
|
|
5042
|
+
} catch (e) {}
|
|
5043
|
+
|
|
5044
|
+
// Mirror into user-specific localStorage blob for persistence across sessions
|
|
5045
|
+
try {
|
|
5046
|
+
const userKey = this.userID ? 'user_' + this.userID : 'user_anonymous';
|
|
5047
|
+
const existing = localStorage.getItem(userKey);
|
|
5048
|
+
const storeObj = existing ? JSON.parse(existing) : {};
|
|
5049
|
+
storeObj['layerOpacities'] = JSON.stringify(layerOpacities);
|
|
5050
|
+
if (sessionStorage.getItem('layersInfo')) {
|
|
5051
|
+
storeObj['layersInfo'] = sessionStorage.getItem('layersInfo');
|
|
5052
|
+
}
|
|
5053
|
+
localStorage.setItem(userKey, JSON.stringify(storeObj));
|
|
5054
|
+
} catch (e) {}
|
|
5055
|
+
|
|
4897
5056
|
// Save to localStorage for user service layers
|
|
4898
5057
|
const savedServices = JSON.parse(
|
|
4899
5058
|
localStorage.getItem(USER_SERVICES_KEY + '_' + this.userID),
|
|
@@ -4904,7 +5063,7 @@ class MenuWidget extends React.Component {
|
|
|
4904
5063
|
|
|
4905
5064
|
// Update opacity for matching layer in user services
|
|
4906
5065
|
savedServices.forEach((service) => {
|
|
4907
|
-
if (service.LayerId ===
|
|
5066
|
+
if (service.LayerId === layerId) {
|
|
4908
5067
|
service.opacity = value;
|
|
4909
5068
|
servicesUpdated = true;
|
|
4910
5069
|
}
|
|
@@ -1379,8 +1379,10 @@ div.upload-container.esri-component
|
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
1381
|
.calendar-button:hover {
|
|
1382
|
-
|
|
1383
|
-
|
|
1382
|
+
border-width: 1px;
|
|
1383
|
+
border-style: solid;
|
|
1384
|
+
border-color: #a0b128;
|
|
1385
|
+
border-radius: 2px;
|
|
1384
1386
|
}
|
|
1385
1387
|
|
|
1386
1388
|
.datepicker {
|