@eeacms/volto-arcgis-block 0.1.374 → 0.1.375

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.375](https://github.com/eea/volto-arcgis-block/compare/0.1.374...0.1.375) - 14 July 2025
8
+
7
9
  ### [0.1.374](https://github.com/eea/volto-arcgis-block/compare/0.1.373...0.1.374) - 9 July 2025
8
10
 
9
11
  ### [0.1.373](https://github.com/eea/volto-arcgis-block/compare/0.1.372...0.1.373) - 8 July 2025
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.374",
3
+ "version": "0.1.375",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -870,7 +870,10 @@ class AreaWidget extends React.Component {
870
870
  checkExtent(extent) {
871
871
  const areaLimit = this.mapviewer_config.Components[0].Products[0]
872
872
  .Datasets[0].DownloadLimitAreaExtent;
873
- if (extent.width * extent.height > areaLimit) {
873
+ if (
874
+ extent.width * extent.height > areaLimit ||
875
+ extent.width * extent.height === 0
876
+ ) {
874
877
  return true;
875
878
  } else {
876
879
  return false;
@@ -993,20 +996,32 @@ class AreaWidget extends React.Component {
993
996
  }
994
997
  addCoordinates() {
995
998
  this.clearWidget();
996
- let pointNorth = !isNaN(document.getElementById('menu-north').value)
997
- ? Number(document.getElementById('menu-north').value)
998
- : 0;
999
- let pointSouth = !isNaN(document.getElementById('menu-south').value)
1000
- ? Number(document.getElementById('menu-south').value)
1001
- : 0;
1002
- let pointEast = !isNaN(document.getElementById('menu-east').value)
1003
- ? Number(document.getElementById('menu-east').value)
1004
- : 0;
1005
- let pointWest = !isNaN(document.getElementById('menu-west').value)
1006
- ? Number(document.getElementById('menu-west').value)
1007
- : 0;
1008
- let pointNE = [pointNorth, pointEast];
1009
- let pointSW = [pointSouth, pointWest];
999
+ let pointNorth = document.getElementById('menu-north');
1000
+ if (pointNorth.value > 90) {
1001
+ pointNorth.value = 90;
1002
+ } else if (pointNorth.value < -90) {
1003
+ pointNorth.value = -90;
1004
+ }
1005
+ let pointSouth = document.getElementById('menu-south');
1006
+ if (pointSouth.value > 90) {
1007
+ pointSouth.value = 90;
1008
+ } else if (pointSouth.value < -90) {
1009
+ pointSouth.value = -90;
1010
+ }
1011
+ let pointEast = document.getElementById('menu-east');
1012
+ if (pointEast.value > 180) {
1013
+ pointEast.value = 180;
1014
+ } else if (pointEast.value < -180) {
1015
+ pointEast.value = -180;
1016
+ }
1017
+ let pointWest = document.getElementById('menu-west');
1018
+ if (pointWest.value > 180) {
1019
+ pointWest.value = 180;
1020
+ } else if (pointWest.value < -180) {
1021
+ pointWest.value = -180;
1022
+ }
1023
+ let pointNW = [pointNorth.value, pointWest.value];
1024
+ let pointSE = [pointSouth.value, pointEast.value];
1010
1025
  var fillSymbol = {
1011
1026
  type: 'simple-fill',
1012
1027
  color: [255, 255, 255, 0.5],
@@ -1017,10 +1032,10 @@ class AreaWidget extends React.Component {
1017
1032
  };
1018
1033
  let extentGraphic = new Graphic({
1019
1034
  geometry: new Extent({
1020
- xmin: Math.min(pointNE[1], pointSW[1]),
1021
- xmax: Math.max(pointNE[1], pointSW[1]),
1022
- ymin: Math.min(pointNE[0], pointSW[0]),
1023
- ymax: Math.max(pointNE[0], pointSW[0]),
1035
+ xmin: Math.min(pointNW[1], pointSE[1]),
1036
+ xmax: Math.max(pointNW[1], pointSE[1]),
1037
+ ymin: Math.min(pointNW[0], pointSE[0]),
1038
+ ymax: Math.max(pointNW[0], pointSE[0]),
1024
1039
  spatialReference: { wkid: 4326 },
1025
1040
  }),
1026
1041
  symbol: fillSymbol,
@@ -1048,9 +1063,9 @@ class AreaWidget extends React.Component {
1048
1063
  this.props.updateArea({
1049
1064
  origin: {
1050
1065
  x: extentGraphic.geometry.xmin,
1051
- y: extentGraphic.geometry.ymin,
1066
+ y: extentGraphic.geometry.ymax,
1052
1067
  },
1053
- end: { x: extentGraphic.geometry.xmax, y: extentGraphic.geometry.ymax },
1068
+ end: { x: extentGraphic.geometry.xmax, y: extentGraphic.geometry.ymin },
1054
1069
  });
1055
1070
  this.props.view.graphics.add(extentGraphic);
1056
1071
  }
@@ -1750,13 +1765,14 @@ class AreaWidget extends React.Component {
1750
1765
  </div>
1751
1766
  <div className="coordinateContainer">
1752
1767
  <div className="coordinateSubContainer">
1753
- <div className="coordinateSubContainerTitle">NE</div>
1768
+ <div className="coordinateSubContainerTitle">NW</div>
1754
1769
  <div>
1755
1770
  Lat:
1756
1771
  <input
1757
- type="text"
1772
+ type="number"
1758
1773
  id="menu-north"
1759
- maxLength="9"
1774
+ min="-90"
1775
+ max="90"
1760
1776
  placeholder="00.000000"
1761
1777
  className="coordinateInput"
1762
1778
  />
@@ -1764,22 +1780,24 @@ class AreaWidget extends React.Component {
1764
1780
  <div>
1765
1781
  Lon:
1766
1782
  <input
1767
- type="text"
1768
- id="menu-east"
1769
- maxLength="9"
1783
+ type="number"
1784
+ id="menu-west"
1785
+ min="-180"
1786
+ max="180"
1770
1787
  placeholder="00.000000"
1771
1788
  className="coordinateInput"
1772
1789
  />
1773
1790
  </div>
1774
1791
  </div>
1775
1792
  <div className="coordinateSubContainer">
1776
- <div className="coordinateSubContainerTitle">SW</div>
1793
+ <div className="coordinateSubContainerTitle">SE</div>
1777
1794
  <div>
1778
1795
  Lat:
1779
1796
  <input
1780
- type="text"
1797
+ type="number"
1781
1798
  id="menu-south"
1782
- maxLength="9"
1799
+ min="-90"
1800
+ max="90"
1783
1801
  placeholder="00.000000"
1784
1802
  className="coordinateInput"
1785
1803
  />
@@ -1787,9 +1805,10 @@ class AreaWidget extends React.Component {
1787
1805
  <div>
1788
1806
  Lon:
1789
1807
  <input
1790
- type="text"
1791
- id="menu-west"
1792
- maxLength="9"
1808
+ type="number"
1809
+ id="menu-east"
1810
+ min="-180"
1811
+ max="180"
1793
1812
  placeholder="00.000000"
1794
1813
  className="coordinateInput"
1795
1814
  />
@@ -535,6 +535,7 @@ label.ccl-form-radio-label span.nuts-menu-icon {
535
535
  border-style: solid;
536
536
  border-color: #a0b128 !important;
537
537
  margin-left: 0.5rem;
538
+ outline: none;
538
539
  }
539
540
 
540
541
  /* WMS Upload */