@eeacms/volto-arcgis-block 0.1.394 → 0.1.395

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.395](https://github.com/eea/volto-arcgis-block/compare/0.1.394...0.1.395) - 3 October 2025
8
+
7
9
  ### [0.1.394](https://github.com/eea/volto-arcgis-block/compare/0.1.393...0.1.394) - 2 October 2025
8
10
 
9
11
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-arcgis-block",
3
- "version": "0.1.394",
3
+ "version": "0.1.395",
4
4
  "description": "volto-arcgis-block: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: CodeSyntax",
@@ -1328,6 +1328,7 @@ class AreaWidget extends React.Component {
1328
1328
  '</div>';
1329
1329
  this.props.download && this.props.view.ui.add(popup, 'top-right');
1330
1330
  });
1331
+ this.dragElement(document.querySelector('.coordinateWindow'));
1331
1332
  }
1332
1333
 
1333
1334
  async initFMI() {
@@ -1349,6 +1350,38 @@ class AreaWidget extends React.Component {
1349
1350
  //console.error('There was a problem with the fetch operation:', error);
1350
1351
  }
1351
1352
  }
1353
+ dragElement(elmnt) {
1354
+ var pos1 = 0,
1355
+ pos2 = 0,
1356
+ pos3 = 0,
1357
+ pos4 = 0;
1358
+ let header = document.querySelector('.coordinateHeader');
1359
+ const dragMouseDown = (e) => {
1360
+ e.preventDefault();
1361
+ pos3 = e.clientX;
1362
+ pos4 = e.clientY;
1363
+ document.onmouseup = closeDragElement;
1364
+ document.onmousemove = elementDrag;
1365
+ };
1366
+ const elementDrag = (e) => {
1367
+ e.preventDefault();
1368
+ pos1 = pos3 - e.clientX;
1369
+ pos2 = pos4 - e.clientY;
1370
+ pos3 = e.clientX;
1371
+ pos4 = e.clientY;
1372
+ elmnt.style.top = elmnt.offsetTop - pos2 + 'px';
1373
+ elmnt.style.left = elmnt.offsetLeft - pos1 + 'px';
1374
+ };
1375
+ const closeDragElement = () => {
1376
+ document.onmouseup = null;
1377
+ document.onmousemove = null;
1378
+ };
1379
+ if (header) {
1380
+ header.addEventListener('mousedown', dragMouseDown);
1381
+ } else {
1382
+ elmnt.addEventListener('mousedown', dragMouseDown);
1383
+ }
1384
+ }
1352
1385
  /**
1353
1386
  * This method renders the component
1354
1387
  * @returns jsx
@@ -471,8 +471,8 @@ label.ccl-form-radio-label span.nuts-menu-icon {
471
471
 
472
472
  .coordinateWindow {
473
473
  position: absolute;
474
- right: 23rem;
475
- bottom: 2rem;
474
+ top: 23rem;
475
+ left: 47rem;
476
476
  display: none;
477
477
  width: 23rem;
478
478
  height: 13rem;