@eeacms/volto-arcgis-block 0.1.432 → 0.1.433

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.433](https://github.com/eea/volto-arcgis-block/compare/0.1.432...0.1.433) - 9 March 2026
8
+
7
9
  ### [0.1.432](https://github.com/eea/volto-arcgis-block/compare/0.1.431...0.1.432) - 4 March 2026
8
10
 
9
11
  #### :house: Internal changes
@@ -12,6 +14,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
12
14
 
13
15
  #### :hammer_and_wrench: Others
14
16
 
17
+ - Merge pull request #1110 from eea/develop [Unai Bolivar - [`30529ef`](https://github.com/eea/volto-arcgis-block/commit/30529ef893a6e0acbc62027b473c6844f057771d)]
15
18
  - (bug): WMTS layer visualize in 3D globe view mode. [Unai Bolivar - [`71b12ee`](https://github.com/eea/volto-arcgis-block/commit/71b12eea1c424820df05ddb38788fd936933fdfb)]
16
19
  - (feat): When using swipe or print in 3D globe view mode. Switch to 2D default view mode automatically, when closing swipe or print widget, automatically switch back to 3D if user was originally in 3D mode [Unai Bolivar - [`41cc34e`](https://github.com/eea/volto-arcgis-block/commit/41cc34e259a2f07102fe5b96fd908023d6a39411)]
17
20
  - (bug): swipe and print widgets engaged in 3D globe view load in 2D default view automatically [Unai Bolivar - [`57d522e`](https://github.com/eea/volto-arcgis-block/commit/57d522eecbb14a5de68fd6278c93e5e465fe7fe0)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.432",
3
+ "version": "0.1.433",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -940,6 +940,7 @@ class AreaWidget extends React.Component {
940
940
  let origin = null;
941
941
  let originGraphic = null;
942
942
  let cursorGraphic = null;
943
+ let originTextSymbol = null;
943
944
  const drawGraphics = this.props.view.on('drag', (e) => {
944
945
  if (this.props.mapViewer.pan_enabled) return;
945
946
  e.stopPropagation();
@@ -953,10 +954,10 @@ class AreaWidget extends React.Component {
953
954
  originLon: origin.longitude.toFixed(3),
954
955
  },
955
956
  });
956
- let originTextSymbol = new TextSymbol(
957
- this.state.areaCoordinates.originLon +
958
- ' , ' +
959
- this.state.areaCoordinates.originLat,
957
+ originTextSymbol = new TextSymbol(
958
+ this.state.areaCoordinates.originLat +
959
+ ', ' +
960
+ this.state.areaCoordinates.originLon,
960
961
  );
961
962
  originTextSymbol.horizontalAlignment = 'right';
962
963
  originTextSymbol.verticalAlignment = 'bottom';
@@ -1003,6 +1004,7 @@ class AreaWidget extends React.Component {
1003
1004
  } else if (e.action === 'update') {
1004
1005
  if (extentGraphic) this.props.view.graphics.remove(extentGraphic);
1005
1006
  if (cursorGraphic) this.props.view.graphics.remove(cursorGraphic);
1007
+ if (originGraphic) this.props.view.graphics.remove(originGraphic);
1006
1008
  let p = this.props.view.toMap(e);
1007
1009
  this.setState({
1008
1010
  areaCoordinates: {
@@ -1060,19 +1062,49 @@ class AreaWidget extends React.Component {
1060
1062
  end: { x: p.longitude, y: p.latitude },
1061
1063
  });
1062
1064
  this.props.view.graphics.add(extentGraphic);
1065
+ originTextSymbol = new TextSymbol(
1066
+ this.state.areaCoordinates.originLat +
1067
+ ', ' +
1068
+ this.state.areaCoordinates.originLon,
1069
+ );
1063
1070
  let cursorTextSymbol = new TextSymbol(
1064
- this.state.areaCoordinates.cursorLon +
1065
- ' , ' +
1066
- this.state.areaCoordinates.cursorLat,
1071
+ this.state.areaCoordinates.cursorLat +
1072
+ ', ' +
1073
+ this.state.areaCoordinates.cursorLon,
1067
1074
  );
1068
- cursorTextSymbol.horizontalAlignment = 'left';
1069
- cursorTextSymbol.verticalAlignment = 'top';
1070
- cursorTextSymbol.font.size = 8;
1075
+ if (
1076
+ parseFloat(this.state.areaCoordinates.originLat) >
1077
+ parseFloat(this.state.areaCoordinates.cursorLat)
1078
+ ) {
1079
+ originTextSymbol.verticalAlignment = 'bottom';
1080
+ cursorTextSymbol.verticalAlignment = 'top';
1081
+ } else {
1082
+ originTextSymbol.verticalAlignment = 'top';
1083
+ cursorTextSymbol.verticalAlignment = 'bottom';
1084
+ }
1085
+ if (
1086
+ parseFloat(this.state.areaCoordinates.originLon) >
1087
+ parseFloat(this.state.areaCoordinates.cursorLon)
1088
+ ) {
1089
+ originTextSymbol.horizontalAlignment = 'left';
1090
+ cursorTextSymbol.horizontalAlignment = 'right';
1091
+ } else {
1092
+ originTextSymbol.horizontalAlignment = 'right';
1093
+ cursorTextSymbol.horizontalAlignment = 'left';
1094
+ }
1095
+ originTextSymbol.font.size = 8;
1071
1096
  var point2 = new Point(
1097
+ this.state.areaCoordinates.originLon,
1098
+ this.state.areaCoordinates.originLat,
1099
+ );
1100
+ originGraphic = new Graphic(point2, originTextSymbol);
1101
+ this.props.view.graphics.add(originGraphic);
1102
+ cursorTextSymbol.font.size = 8;
1103
+ var point3 = new Point(
1072
1104
  this.state.areaCoordinates.cursorLon,
1073
1105
  this.state.areaCoordinates.cursorLat,
1074
1106
  );
1075
- cursorGraphic = new Graphic(point2, cursorTextSymbol);
1107
+ cursorGraphic = new Graphic(point3, cursorTextSymbol);
1076
1108
  this.props.view.graphics.add(cursorGraphic);
1077
1109
  }
1078
1110
  });