@eeacms/volto-arcgis-block 0.1.395 → 0.1.396
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.396](https://github.com/eea/volto-arcgis-block/compare/0.1.395...0.1.396) - 9 October 2025
|
|
8
|
+
|
|
9
|
+
#### :hammer_and_wrench: Others
|
|
10
|
+
|
|
11
|
+
- Merge pull request #1033 from eea/CLMS-292637-UPDATED [Unai Bolivar - [`ec88d8a`](https://github.com/eea/volto-arcgis-block/commit/ec88d8a0bae01b4b4513dcd6f6efb65e0fb39e99)]
|
|
12
|
+
- (task): Bookmark thumbnail is saved along with the rest of the bookmark data. [Unai Bolivar - [`c57f925`](https://github.com/eea/volto-arcgis-block/commit/c57f925eb112a455fa2bed7150003a4633984b1a)]
|
|
13
|
+
- (task): bookmark data persistence managed. [Unai Bolivar - [`10cd300`](https://github.com/eea/volto-arcgis-block/commit/10cd300f6af9d1cfc457f58dadadaf9540890d19)]
|
|
7
14
|
### [0.1.395](https://github.com/eea/volto-arcgis-block/compare/0.1.394...0.1.395) - 3 October 2025
|
|
8
15
|
|
|
9
16
|
### [0.1.394](https://github.com/eea/volto-arcgis-block/compare/0.1.393...0.1.394) - 2 October 2025
|
package/package.json
CHANGED
|
@@ -395,28 +395,11 @@ class BookmarkWidget extends React.Component {
|
|
|
395
395
|
// shouldUpdate = true;
|
|
396
396
|
// }
|
|
397
397
|
if (shouldUpdate && this.userID != null) {
|
|
398
|
-
// localStorage.setItem(
|
|
399
|
-
// BOOKMARK_SESSION_KEY + '_' + this.userID,
|
|
400
|
-
// JSON.stringify(this.Bookmarks.bookmarks.items),
|
|
401
|
-
// );
|
|
402
|
-
// localStorage.setItem(
|
|
403
|
-
// BOOKMARK_SESSION_KEY + '_' + this.userID + '_layers',
|
|
404
|
-
// JSON.stringify(this.sessionBookmarkLayers),
|
|
405
|
-
// );
|
|
406
|
-
// localStorage.setItem(
|
|
407
|
-
// BOOKMARK_SESSION_KEY + '_' + this.userID + '_opacity',
|
|
408
|
-
// JSON.stringify(this.sessionBookmarkOpacity),
|
|
409
|
-
// );
|
|
410
|
-
// localStorage.setItem(
|
|
411
|
-
// BOOKMARK_SESSION_KEY + '_' + this.userID + '_visible',
|
|
412
|
-
// JSON.stringify(this.sessionBookmarkVisible),
|
|
413
|
-
// );
|
|
414
|
-
// localStorage.setItem(
|
|
415
|
-
// BOOKMARK_SESSION_KEY + '_' + this.userID + '_hotspot',
|
|
416
|
-
// JSON.stringify(this.sessionBookmarkHotspot),
|
|
417
|
-
// );
|
|
418
398
|
if (this._skipNextChangePersist) {
|
|
419
399
|
this._skipNextChangePersist = false;
|
|
400
|
+
if (e.added && e.added[0]) {
|
|
401
|
+
this.saveBookmarksToUserObject();
|
|
402
|
+
}
|
|
420
403
|
} else {
|
|
421
404
|
this.saveBookmarksToUserObject();
|
|
422
405
|
}
|
|
@@ -821,7 +804,14 @@ class BookmarkWidget extends React.Component {
|
|
|
821
804
|
bookmarks.selectedHotspotFilter != null
|
|
822
805
|
? bookmarks.selectedHotspotFilter
|
|
823
806
|
: null;
|
|
824
|
-
this.sessionBookmarks = items
|
|
807
|
+
this.sessionBookmarks = items.map((b) => {
|
|
808
|
+
if (b && b.thumbnail) {
|
|
809
|
+
if (b.thumbnail.url)
|
|
810
|
+
return { ...b, thumbnail: { url: b.thumbnail.url } };
|
|
811
|
+
return { ...b };
|
|
812
|
+
}
|
|
813
|
+
return b;
|
|
814
|
+
});
|
|
825
815
|
this.sessionBookmarkLayers = layers;
|
|
826
816
|
while (this.sessionBookmarkLayers.length < this.sessionBookmarks.length) {
|
|
827
817
|
this.sessionBookmarkLayers.push([]);
|
|
@@ -854,9 +844,55 @@ class BookmarkWidget extends React.Component {
|
|
|
854
844
|
} catch (e) {
|
|
855
845
|
userObj = {};
|
|
856
846
|
}
|
|
857
|
-
const
|
|
847
|
+
const rawItems = this.Bookmarks?.bookmarks?.items
|
|
858
848
|
? this.Bookmarks.bookmarks.items
|
|
859
849
|
: this.sessionBookmarks;
|
|
850
|
+
const items = Array.isArray(rawItems)
|
|
851
|
+
? rawItems.map((b) => {
|
|
852
|
+
const out = {};
|
|
853
|
+
let name;
|
|
854
|
+
if (b && (b.name || b.label || b.title)) {
|
|
855
|
+
name = b.name || b.label || b.title;
|
|
856
|
+
}
|
|
857
|
+
if (name !== undefined) out.name = name;
|
|
858
|
+
let g = null;
|
|
859
|
+
if (b && b.viewpoint && b.viewpoint.targetGeometry) {
|
|
860
|
+
g = b.viewpoint.targetGeometry;
|
|
861
|
+
} else if (b && b.extent) {
|
|
862
|
+
g = b.extent;
|
|
863
|
+
}
|
|
864
|
+
if (
|
|
865
|
+
g &&
|
|
866
|
+
(g.type === 'extent' ||
|
|
867
|
+
(g.xmin != null &&
|
|
868
|
+
g.ymin != null &&
|
|
869
|
+
g.xmax != null &&
|
|
870
|
+
g.ymax != null))
|
|
871
|
+
) {
|
|
872
|
+
out.extent = {
|
|
873
|
+
xmin: g.xmin,
|
|
874
|
+
ymin: g.ymin,
|
|
875
|
+
xmax: g.xmax,
|
|
876
|
+
ymax: g.ymax,
|
|
877
|
+
spatialReference: g.spatialReference
|
|
878
|
+
? {
|
|
879
|
+
wkid: g.spatialReference.wkid,
|
|
880
|
+
latestWkid: g.spatialReference.latestWkid,
|
|
881
|
+
wkt: g.spatialReference.wkt,
|
|
882
|
+
}
|
|
883
|
+
: undefined,
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
if (b && b.thumbnail) {
|
|
887
|
+
if (b.thumbnail.url) {
|
|
888
|
+
out.thumbnail = { url: b.thumbnail.url };
|
|
889
|
+
} else {
|
|
890
|
+
out.thumbnail = b.thumbnail;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
return out;
|
|
894
|
+
})
|
|
895
|
+
: [];
|
|
860
896
|
const layers = this.sessionBookmarkLayers;
|
|
861
897
|
const opacity = this.sessionBookmarkOpacity;
|
|
862
898
|
const visible = this.sessionBookmarkVisible;
|