@eox/drawtools 1.3.0 → 1.4.0

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.
Files changed (179) hide show
  1. package/dist/eox-drawtools.js +4188 -7348
  2. package/dist/eox-drawtools.umd.cjs +57 -57
  3. package/package.json +7 -7
  4. package/src/main.js +50 -3
  5. package/src/methods/draw/index.js +5 -0
  6. package/src/methods/draw/on-key-down.js +16 -0
  7. package/src/methods/draw/remove-feature.js +27 -0
  8. package/src/methods/draw/start-drawing.js +0 -9
  9. package/types/components/controller.d.ts.map +1 -0
  10. package/types/{drawtools/src/components → components}/list.d.ts +3 -3
  11. package/types/components/list.d.ts.map +1 -0
  12. package/types/{drawtools/src/enums → enums}/draw.d.ts.map +1 -1
  13. package/types/{drawtools/src/enums → enums}/index.d.ts.map +1 -1
  14. package/types/enums/stories.d.ts.map +1 -0
  15. package/types/{drawtools/src/enums → enums}/test.d.ts.map +1 -1
  16. package/types/helpers/copy-text-to-clipboard.d.ts.map +1 -0
  17. package/types/helpers/features-to-geojson.d.ts.map +1 -0
  18. package/types/helpers/features-to-wkt.d.ts.map +1 -0
  19. package/types/{drawtools/src/helpers → helpers}/generate-upload-events.d.ts +1 -1
  20. package/types/helpers/generate-upload-events.d.ts.map +1 -0
  21. package/types/{drawtools/src/helpers → helpers}/index.d.ts.map +1 -1
  22. package/types/{drawtools/src/main.d.ts → main.d.ts} +34 -6
  23. package/types/main.d.ts.map +1 -0
  24. package/types/methods/controller/index.d.ts.map +1 -0
  25. package/types/methods/controller/update-button-states.d.ts.map +1 -0
  26. package/types/methods/draw/create-select-handler.d.ts.map +1 -0
  27. package/types/methods/draw/discard-drawing.d.ts.map +1 -0
  28. package/types/methods/draw/emit-drawn-features.d.ts.map +1 -0
  29. package/types/{drawtools/src/methods → methods}/draw/handle-layer-id.d.ts +1 -1
  30. package/types/methods/draw/handle-layer-id.d.ts.map +1 -0
  31. package/types/{drawtools/src/methods → methods}/draw/index.d.ts +2 -0
  32. package/types/{map/src/enums → methods/draw}/index.d.ts.map +1 -1
  33. package/types/{drawtools/src/methods → methods}/draw/init-layer.d.ts +2 -2
  34. package/types/methods/draw/init-layer.d.ts.map +1 -0
  35. package/types/methods/draw/init-measuring.d.ts.map +1 -0
  36. package/types/{drawtools/src/methods → methods}/draw/init-selection.d.ts +1 -1
  37. package/types/methods/draw/init-selection.d.ts.map +1 -0
  38. package/types/methods/draw/on-draw-end.d.ts.map +1 -0
  39. package/types/methods/draw/on-key-down.d.ts +10 -0
  40. package/types/methods/draw/on-key-down.d.ts.map +1 -0
  41. package/types/methods/draw/remove-feature.d.ts +15 -0
  42. package/types/methods/draw/remove-feature.d.ts.map +1 -0
  43. package/types/methods/draw/start-drawing.d.ts.map +1 -0
  44. package/types/methods/list/delete-feature.d.ts.map +1 -0
  45. package/types/methods/list/first-update.d.ts.map +1 -0
  46. package/types/methods/list/hover-feature.d.ts.map +1 -0
  47. package/types/{map/src/helpers → methods/list}/index.d.ts.map +1 -1
  48. package/types/methods/list/select-deselect-feature.d.ts.map +1 -0
  49. package/types/{drawtools/src/style.eox.d.ts.map → style.eox.d.ts.map} +1 -1
  50. package/types/drawtools/src/components/controller.d.ts.map +0 -1
  51. package/types/drawtools/src/components/list.d.ts.map +0 -1
  52. package/types/drawtools/src/enums/stories.d.ts.map +0 -1
  53. package/types/drawtools/src/helpers/copy-text-to-clipboard.d.ts.map +0 -1
  54. package/types/drawtools/src/helpers/features-to-geojson.d.ts.map +0 -1
  55. package/types/drawtools/src/helpers/features-to-wkt.d.ts.map +0 -1
  56. package/types/drawtools/src/helpers/generate-upload-events.d.ts.map +0 -1
  57. package/types/drawtools/src/main.d.ts.map +0 -1
  58. package/types/drawtools/src/methods/controller/index.d.ts.map +0 -1
  59. package/types/drawtools/src/methods/controller/update-button-states.d.ts.map +0 -1
  60. package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +0 -1
  61. package/types/drawtools/src/methods/draw/discard-drawing.d.ts.map +0 -1
  62. package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +0 -1
  63. package/types/drawtools/src/methods/draw/handle-layer-id.d.ts.map +0 -1
  64. package/types/drawtools/src/methods/draw/index.d.ts.map +0 -1
  65. package/types/drawtools/src/methods/draw/init-layer.d.ts.map +0 -1
  66. package/types/drawtools/src/methods/draw/init-measuring.d.ts.map +0 -1
  67. package/types/drawtools/src/methods/draw/init-selection.d.ts.map +0 -1
  68. package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +0 -1
  69. package/types/drawtools/src/methods/draw/start-drawing.d.ts.map +0 -1
  70. package/types/drawtools/src/methods/list/delete-feature.d.ts.map +0 -1
  71. package/types/drawtools/src/methods/list/first-update.d.ts.map +0 -1
  72. package/types/drawtools/src/methods/list/hover-feature.d.ts.map +0 -1
  73. package/types/drawtools/src/methods/list/index.d.ts.map +0 -1
  74. package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +0 -1
  75. package/types/map/src/components/compare.d.ts +0 -31
  76. package/types/map/src/components/compare.d.ts.map +0 -1
  77. package/types/map/src/components/tooltip.d.ts +0 -41
  78. package/types/map/src/components/tooltip.d.ts.map +0 -1
  79. package/types/map/src/controls/GlobeSwitcher.d.ts +0 -19
  80. package/types/map/src/controls/GlobeSwitcher.d.ts.map +0 -1
  81. package/types/map/src/controls/controls.d.ts +0 -20
  82. package/types/map/src/controls/controls.d.ts.map +0 -1
  83. package/types/map/src/controls/geo-location.d.ts +0 -51
  84. package/types/map/src/controls/geo-location.d.ts.map +0 -1
  85. package/types/map/src/controls/loading-indicator.d.ts +0 -20
  86. package/types/map/src/controls/loading-indicator.d.ts.map +0 -1
  87. package/types/map/src/custom/layers/MapboxStyle.d.ts +0 -13
  88. package/types/map/src/custom/layers/MapboxStyle.d.ts.map +0 -1
  89. package/types/map/src/custom/sources/Cluster.d.ts +0 -24
  90. package/types/map/src/custom/sources/Cluster.d.ts.map +0 -1
  91. package/types/map/src/custom/sources/FlatGeoBuf.d.ts +0 -30
  92. package/types/map/src/custom/sources/FlatGeoBuf.d.ts.map +0 -1
  93. package/types/map/src/custom/sources/WMTSCapabilities.d.ts +0 -35
  94. package/types/map/src/custom/sources/WMTSCapabilities.d.ts.map +0 -1
  95. package/types/map/src/enums/index.d.ts +0 -2
  96. package/types/map/src/enums/map.d.ts +0 -5
  97. package/types/map/src/enums/map.d.ts.map +0 -1
  98. package/types/map/src/helpers/add-new-feature.d.ts +0 -15
  99. package/types/map/src/helpers/add-new-feature.d.ts.map +0 -1
  100. package/types/map/src/helpers/cancel-animation.d.ts +0 -7
  101. package/types/map/src/helpers/cancel-animation.d.ts.map +0 -1
  102. package/types/map/src/helpers/center.d.ts +0 -12
  103. package/types/map/src/helpers/center.d.ts.map +0 -1
  104. package/types/map/src/helpers/cluster-explode.d.ts +0 -42
  105. package/types/map/src/helpers/cluster-explode.d.ts.map +0 -1
  106. package/types/map/src/helpers/coordinates-roughly-equals.d.ts +0 -12
  107. package/types/map/src/helpers/coordinates-roughly-equals.d.ts.map +0 -1
  108. package/types/map/src/helpers/draw.d.ts +0 -22
  109. package/types/map/src/helpers/draw.d.ts.map +0 -1
  110. package/types/map/src/helpers/generate.d.ts +0 -32
  111. package/types/map/src/helpers/generate.d.ts.map +0 -1
  112. package/types/map/src/helpers/index.d.ts +0 -17
  113. package/types/map/src/helpers/interactions.d.ts +0 -16
  114. package/types/map/src/helpers/interactions.d.ts.map +0 -1
  115. package/types/map/src/helpers/layer.d.ts +0 -26
  116. package/types/map/src/helpers/layer.d.ts.map +0 -1
  117. package/types/map/src/helpers/parse-feature.d.ts +0 -8
  118. package/types/map/src/helpers/parse-feature.d.ts.map +0 -1
  119. package/types/map/src/helpers/parse-text.d.ts +0 -45
  120. package/types/map/src/helpers/parse-text.d.ts.map +0 -1
  121. package/types/map/src/helpers/register-projection-from-code.d.ts +0 -8
  122. package/types/map/src/helpers/register-projection-from-code.d.ts.map +0 -1
  123. package/types/map/src/helpers/register-projection.d.ts +0 -11
  124. package/types/map/src/helpers/register-projection.d.ts.map +0 -1
  125. package/types/map/src/helpers/select.d.ts +0 -99
  126. package/types/map/src/helpers/select.d.ts.map +0 -1
  127. package/types/map/src/helpers/tile-grid.d.ts +0 -10
  128. package/types/map/src/helpers/tile-grid.d.ts.map +0 -1
  129. package/types/map/src/helpers/transform.d.ts +0 -19
  130. package/types/map/src/helpers/transform.d.ts.map +0 -1
  131. package/types/map/src/layers.d.ts +0 -126
  132. package/types/map/src/layers.d.ts.map +0 -1
  133. package/types/map/src/main.d.ts +0 -481
  134. package/types/map/src/main.d.ts.map +0 -1
  135. package/types/map/src/methods/map/add-update-layer.d.ts +0 -13
  136. package/types/map/src/methods/map/add-update-layer.d.ts.map +0 -1
  137. package/types/map/src/methods/map/animate-to-state.d.ts +0 -7
  138. package/types/map/src/methods/map/animate-to-state.d.ts.map +0 -1
  139. package/types/map/src/methods/map/first-updated.d.ts +0 -9
  140. package/types/map/src/methods/map/first-updated.d.ts.map +0 -1
  141. package/types/map/src/methods/map/getters.d.ts +0 -22
  142. package/types/map/src/methods/map/getters.d.ts.map +0 -1
  143. package/types/map/src/methods/map/index.d.ts +0 -7
  144. package/types/map/src/methods/map/index.d.ts.map +0 -1
  145. package/types/map/src/methods/map/remove.d.ts +0 -22
  146. package/types/map/src/methods/map/remove.d.ts.map +0 -1
  147. package/types/map/src/methods/map/setters.d.ts +0 -83
  148. package/types/map/src/methods/map/setters.d.ts.map +0 -1
  149. package/types/map/src/plugins/globe/index.d.ts +0 -6
  150. package/types/map/src/plugins/globe/index.d.ts.map +0 -1
  151. package/types/map/src/plugins/globe/methods.d.ts +0 -8
  152. package/types/map/src/plugins/globe/methods.d.ts.map +0 -1
  153. package/types/map/src/plugins/globe/openglobus.d.ts +0 -25
  154. package/types/map/src/plugins/globe/openglobus.d.ts.map +0 -1
  155. package/types/map/src/types.d.ts +0 -193
  156. package/types/map/src/types.d.ts.map +0 -1
  157. /package/types/{drawtools/src/components → components}/controller.d.ts +0 -0
  158. /package/types/{drawtools/src/enums → enums}/draw.d.ts +0 -0
  159. /package/types/{drawtools/src/enums → enums}/index.d.ts +0 -0
  160. /package/types/{drawtools/src/enums → enums}/stories.d.ts +0 -0
  161. /package/types/{drawtools/src/enums → enums}/test.d.ts +0 -0
  162. /package/types/{drawtools/src/helpers → helpers}/copy-text-to-clipboard.d.ts +0 -0
  163. /package/types/{drawtools/src/helpers → helpers}/features-to-geojson.d.ts +0 -0
  164. /package/types/{drawtools/src/helpers → helpers}/features-to-wkt.d.ts +0 -0
  165. /package/types/{drawtools/src/helpers → helpers}/index.d.ts +0 -0
  166. /package/types/{drawtools/src/methods → methods}/controller/index.d.ts +0 -0
  167. /package/types/{drawtools/src/methods → methods}/controller/update-button-states.d.ts +0 -0
  168. /package/types/{drawtools/src/methods → methods}/draw/create-select-handler.d.ts +0 -0
  169. /package/types/{drawtools/src/methods → methods}/draw/discard-drawing.d.ts +0 -0
  170. /package/types/{drawtools/src/methods → methods}/draw/emit-drawn-features.d.ts +0 -0
  171. /package/types/{drawtools/src/methods → methods}/draw/init-measuring.d.ts +0 -0
  172. /package/types/{drawtools/src/methods → methods}/draw/on-draw-end.d.ts +0 -0
  173. /package/types/{drawtools/src/methods → methods}/draw/start-drawing.d.ts +0 -0
  174. /package/types/{drawtools/src/methods → methods}/list/delete-feature.d.ts +0 -0
  175. /package/types/{drawtools/src/methods → methods}/list/first-update.d.ts +0 -0
  176. /package/types/{drawtools/src/methods → methods}/list/hover-feature.d.ts +0 -0
  177. /package/types/{drawtools/src/methods → methods}/list/index.d.ts +0 -0
  178. /package/types/{drawtools/src/methods → methods}/list/select-deselect-feature.d.ts +0 -0
  179. /package/types/{drawtools/src/style.eox.d.ts → style.eox.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/drawtools",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "devDependencies": {
10
10
  "@eox/map": "*",
11
- "vite": "^7.1.12"
11
+ "vite": "^8.0.10"
12
12
  },
13
13
  "engines": {
14
14
  "npm": ">=8.0.0",
15
- "node": ">=18.0.0"
15
+ "node": ">=24.0.0"
16
16
  },
17
17
  "files": [
18
18
  "types",
@@ -20,14 +20,14 @@
20
20
  "src"
21
21
  ],
22
22
  "main": "./src/main.js",
23
- "types": "./types/drawtools/src/main.d.ts",
23
+ "types": "./types/main.d.ts",
24
24
  "typesVersions": {
25
25
  "*": {
26
26
  ".": [
27
- "./types/drawtools/src/main.d.ts"
27
+ "./types/main.d.ts"
28
28
  ],
29
29
  "src/*": [
30
- "./types/drawtools/src/*"
30
+ "./types/*"
31
31
  ]
32
32
  }
33
33
  },
@@ -41,6 +41,6 @@
41
41
  "@eox/elements-utils": "^1.1.0",
42
42
  "@eox/ui": "^1.1.0",
43
43
  "lit": "^3.2.0",
44
- "ol": "^10.4.0"
44
+ "ol": "^10.9.0"
45
45
  }
46
46
  }
package/src/main.js CHANGED
@@ -9,6 +9,9 @@ import {
9
9
  emitDrawnFeaturesMethod,
10
10
  createSelectHandler,
11
11
  handleLayerId,
12
+ onKeyDownMethod,
13
+ removeFeatureMethod,
14
+ removeFeatureByIndexMethod,
12
15
  } from "./methods/draw";
13
16
  import { DUMMY_GEO_JSON } from "./enums/index.js";
14
17
  import {
@@ -35,7 +38,17 @@ import {
35
38
  *
36
39
  * Usage examples and visual demos are available in Storybook stories, including scenarios for multi-feature drawing, feature modification, selection, import/export, continuous drawing, format and projection control, and style customization.
37
40
  *
41
+ * ## Methods
42
+ *
43
+ * - `startDrawing`: Triggers starting the drawing interaction on the map.
44
+ * - `discardDrawing`: Triggers discarding/stopping the drawing interaction and deleting the drawn shapes.
45
+ * - `removeFeature`: Removes a feature from the drawn features.
46
+ * - `removeFeatureByIndex`: Removes a feature from the drawn features by its index.
47
+ *
48
+ * Usage: `document.querySelector("eox-drawtools").startDrawing();`
49
+ *
38
50
  * @element eox-drawtools
51
+ * @fires {CustomEvent} drawupdate - Fires whenever features are added, modified or discarded
39
52
  */
40
53
  export class EOxDrawTools extends LitElement {
41
54
  // Define properties with defaults and types
@@ -100,6 +113,11 @@ export class EOxDrawTools extends LitElement {
100
113
  */
101
114
  #drawnFeatures = [];
102
115
 
116
+ /**
117
+ * @type {(e: KeyboardEvent) => void}
118
+ */
119
+ #onKeyDownListener = (e) => onKeyDownMethod(e, this);
120
+
103
121
  constructor() {
104
122
  super();
105
123
 
@@ -246,6 +264,7 @@ export class EOxDrawTools extends LitElement {
246
264
  /**
247
265
  * Used internally to update the drawnFeatures state without overwriting the map layer source.
248
266
  * @param {Array<import("ol").Feature>} features
267
+ * @ignore
249
268
  */
250
269
  setDrawnFeaturesInternal(features) {
251
270
  this.#internalUpdate = true;
@@ -303,24 +322,40 @@ export class EOxDrawTools extends LitElement {
303
322
  }
304
323
 
305
324
  /**
306
- * @onClick Event handler triggered to start drawing on the map.
325
+ * Triggers starting the drawing interaction on the map.
307
326
  */
308
327
  startDrawing() {
309
328
  startDrawingMethod(this);
310
329
  }
311
330
 
312
331
  /**
313
- * @onClick Event handler triggered to discard/stop drawing
314
- * on the map and delete the drawn shapes.
332
+ * Triggers discarding/stopping the drawing interaction and deleting the drawn shapes.
315
333
  */
316
334
  discardDrawing() {
317
335
  discardDrawingMethod(this);
318
336
  }
319
337
 
338
+ /**
339
+ * Removes a feature from the drawn features.
340
+ * @param {import("ol").Feature} feature - The feature to remove.
341
+ */
342
+ removeFeature(feature) {
343
+ removeFeatureMethod(this, feature);
344
+ }
345
+
346
+ /**
347
+ * Removes a feature from the drawn features by its index.
348
+ * @param {number} index - The index of the feature to remove.
349
+ */
350
+ removeFeatureByIndex(index) {
351
+ removeFeatureByIndexMethod(this, index);
352
+ }
353
+
320
354
  /**
321
355
  * @param {string} text - The string representation of the features to be parsed.
322
356
  * @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
323
357
  * @param {boolean} animate - A boolean flag indicating whether to animate the map on feature change.
358
+ * @ignore
324
359
  */
325
360
  handleFeatureChange(text, replaceFeatures = false, animate = true) {
326
361
  this.eoxMap.parseTextToFeature(
@@ -334,6 +369,7 @@ export class EOxDrawTools extends LitElement {
334
369
 
335
370
  /**
336
371
  * @param {DragEvent | InputEvent & { target: HTMLInputElement }} evt - The event object from the file input interaction.
372
+ * @ignore
337
373
  */
338
374
  handleFilesChange(evt) {
339
375
  handleFiles(evt, this);
@@ -341,6 +377,7 @@ export class EOxDrawTools extends LitElement {
341
377
 
342
378
  /**
343
379
  * @event onModifyEnd triggered when the modification of a shape is completed.
380
+ * @ignore
344
381
  */
345
382
  onModifyEnd() {
346
383
  this.emitDrawnFeatures();
@@ -348,6 +385,7 @@ export class EOxDrawTools extends LitElement {
348
385
 
349
386
  /**
350
387
  * Update #geoJSON with stringify feature.
388
+ * @ignore
351
389
  */
352
390
  updateGeoJSON() {
353
391
  this.#geoJSON = JSON.stringify(
@@ -359,6 +397,7 @@ export class EOxDrawTools extends LitElement {
359
397
 
360
398
  /**
361
399
  * Triggers different events when the drawing of a shape is completed.
400
+ * @ignore
362
401
  */
363
402
  emitDrawnFeatures() {
364
403
  /**
@@ -377,6 +416,7 @@ export class EOxDrawTools extends LitElement {
377
416
 
378
417
  /**
379
418
  * Overrides createRenderRoot to handle shadow DOM creation based on the noShadow property.
419
+ * @ignore
380
420
  */
381
421
  createRenderRoot() {
382
422
  return this.noShadow ? this : super.createRenderRoot();
@@ -385,6 +425,7 @@ export class EOxDrawTools extends LitElement {
385
425
  /**
386
426
  * initializes the EOxMap and OlMap instances
387
427
  * And stores them in the private properties #eoxMap and #olMap, respectively.
428
+ * @ignore
388
429
  */
389
430
  updateLayer() {
390
431
  if (this.resetLayer) {
@@ -403,6 +444,7 @@ export class EOxDrawTools extends LitElement {
403
444
  * initializes the EOxMap and OlMap instances
404
445
  * And stores them in the private properties #eoxMap and #olMap, respectively.
405
446
  * It then calls requestUpdate to trigger a re-render.
447
+ * @ignore
406
448
  */
407
449
  firstUpdated() {
408
450
  this.updateLayer();
@@ -418,6 +460,7 @@ export class EOxDrawTools extends LitElement {
418
460
  this.requestUpdate();
419
461
  }
420
462
 
463
+ /** @ignore */
421
464
  updated(changedProperties) {
422
465
  const hasOldValue = (prop) =>
423
466
  changedProperties.has(prop) && changedProperties.get(prop) !== undefined;
@@ -448,16 +491,20 @@ export class EOxDrawTools extends LitElement {
448
491
  this.requestUpdate("eoxMap", oldValue);
449
492
  }
450
493
 
494
+ /** @ignore */
451
495
  connectedCallback() {
452
496
  super.connectedCallback();
497
+ document.addEventListener("keydown", this.#onKeyDownListener);
453
498
  if (this.drawLayer && this.eoxMap) {
454
499
  const { reset } = initLayerMethod(this, this.multipleFeatures);
455
500
  this.resetLayer = reset;
456
501
  }
457
502
  }
458
503
 
504
+ /** @ignore */
459
505
  disconnectedCallback() {
460
506
  super.disconnectedCallback();
507
+ document.removeEventListener("keydown", this.#onKeyDownListener);
461
508
  this.resetLayer?.(this);
462
509
  }
463
510
  // Render method for UI display
@@ -9,3 +9,8 @@ export { default as createSelectHandler } from "./create-select-handler"; // Fac
9
9
  export { default as initSelection } from "./init-selection"; // Initializes selection interactions
10
10
  export { default as handleLayerId } from "./handle-layer-id"; // handle switching between selection and drawing
11
11
  export { default as initMeasuring, updateMeasure } from "./init-measuring"; // Initializes measuring logic
12
+ export { default as onKeyDownMethod } from "./on-key-down.js"; // Handles keydown events
13
+ export {
14
+ removeFeatureMethod,
15
+ removeFeatureByIndexMethod,
16
+ } from "./remove-feature"; // Handles removing a feature
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Handles keydown events for the drawing tool.
3
+ * Specifically, it aborts the drawing process when the Escape key is pressed.
4
+ *
5
+ * @param {KeyboardEvent} event - The keyboard event.
6
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
7
+ */
8
+ const onKeyDownMethod = (event, EoxDrawTool) => {
9
+ if (event.key === "Escape" && EoxDrawTool.currentlyDrawing) {
10
+ EoxDrawTool.draw?.setActive(false);
11
+ EoxDrawTool.currentlyDrawing = false;
12
+ EoxDrawTool.requestUpdate();
13
+ }
14
+ };
15
+
16
+ export default onKeyDownMethod;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Removes a feature from the drawn features.
3
+ *
4
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
5
+ * @param {import("ol").Feature} feature - The feature to remove.
6
+ */
7
+ export function removeFeatureMethod(EoxDrawTool, feature) {
8
+ const index = EoxDrawTool.drawnFeatures.indexOf(feature);
9
+ if (index > -1) {
10
+ removeFeatureByIndexMethod(EoxDrawTool, index);
11
+ }
12
+ }
13
+
14
+ /**
15
+ * Removes a feature from the drawn features by its index.
16
+ *
17
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
18
+ * @param {number} index - The index of the feature to remove.
19
+ */
20
+ export function removeFeatureByIndexMethod(EoxDrawTool, index) {
21
+ if (index > -1 && index < EoxDrawTool.drawnFeatures.length) {
22
+ const newFeatures = [...EoxDrawTool.drawnFeatures];
23
+ newFeatures.splice(index, 1);
24
+ EoxDrawTool.drawnFeatures = newFeatures;
25
+ EoxDrawTool.emitDrawnFeatures();
26
+ }
27
+ }
@@ -23,15 +23,6 @@ const startDrawingMethod = (EoxDrawTool) => {
23
23
  initializeDrawing();
24
24
  // Update the drawing status
25
25
  updateDrawingStatus();
26
-
27
- // Abort drawing on Esc key
28
- document.addEventListener("keydown", ({ key }) => {
29
- if (key === "Escape" && EoxDrawTool.currentlyDrawing) {
30
- EoxDrawTool.draw?.setActive(false);
31
- EoxDrawTool.currentlyDrawing = false;
32
- EoxDrawTool.requestUpdate();
33
- }
34
- });
35
26
  };
36
27
 
37
28
  export default startDrawingMethod;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/components/controller.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWE;IAeA;;OAEG;IACH,0BAA6B;IAE7B;;;;;OAKG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,oBAAuB;IAEvB;;OAEG;IACH,0BAA6B;IAE7B;;OAEG;IACH,cAAoB;IAEpB;;;OAGG;IACH,gBAAiB;IAEjB;;;OAGG;IACH,MAFU,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAE1C;IAErB;;OAEG;IACH,kBAAqB;IAErB;;OAEG;IACH,gBAAmB;IAGrB;;OAEG;IACH,2BAKC;IAED;;OAEG;IACH,yBAEC;IAED,+CA0NC;;CACF;2BA5UyC,KAAK"}
@@ -51,11 +51,11 @@ export class EOxDrawToolsList extends LitElement {
51
51
  /**
52
52
  * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
53
53
  */
54
- hoverInteraction: import("@eox/map").EOxMap["selectInteractions"][string];
54
+ hoverInteraction: any["selectInteractions"][string];
55
55
  /**
56
56
  * @type {import("@eox/map").EOxMap["selectInteractions"][string]}
57
57
  */
58
- clickInteraction: import("@eox/map").EOxMap["selectInteractions"][string];
58
+ clickInteraction: any["selectInteractions"][string];
59
59
  /**
60
60
  * @type string | number
61
61
  */
@@ -71,7 +71,7 @@ export class EOxDrawToolsList extends LitElement {
71
71
  /**
72
72
  * @type import("@eox/map").EOxMap
73
73
  */
74
- eoxMap: import("@eox/map").EOxMap;
74
+ eoxMap: any;
75
75
  /**
76
76
  * @type import("ol").Map
77
77
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAWE;IAEF;;OAEG;IACH,kBAFU,GAAyB,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,kBAFU,GAAyB,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAER;;OAEG;IACH,SAFS,MAAM,GAAG,MAAM,CAEhB;IAKN;;OAEG;IACH,cAFS,OAAO,SAAS,EAAE,YAAY,CAEf;IAExB;;OAEG;IACH,YAAkB;IAElB;;OAEG;IACH,OAFS,OAAO,IAAI,EAAE,GAAG,CAER;IAEjB;;;OAGG;IAEH,MAHS,OAAO,gBAAgB,EAAE,IAAI,CAGtB;IAEhB;;;OAGG;IAEH,WAHS,OAAO,UAAU,EAAE,MAAM,CAAC,OAAO,WAAW,EAAE,MAAM,CAAC,CAGzC;IAErB;;;;;OAKG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;OAEG;IACH,oBAA4B;IAE5B;;OAEG;IACH,oBAA0B;IAE1B;;;OAGG;IAEH,QAHS,OAAO,gBAAgB,EAAE,MAAM,CAGtB;IAElB;;OAEG;IACH,kBAAqB;IAGvB;;;;OAIG;IACH,mBAFW,KAAK,GAAG;QAAE,MAAM,EAAE,iBAAiB,CAAA;KAAE,QAK/C;IAED;;;;OAIG;IACH,yCAFW,OAAO,IAAI,EAAE,OAAO,QAI9B;IAED;;;;OAIG;IACH,+BAHW,MAAM,GAAG,MAAM,GAAG,SAAS,4BAKrC;IAED;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,yBAEC;IAED,+CAwEC;CACF;2BAlOyC,KAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../../../src/enums/draw.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"draw.d.ts","sourceRoot":"","sources":["../../src/enums/draw.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/enums/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../src/enums/stories.js"],"names":[],"mappings":"AAAA;;;;;IAOE;AAEF;;;;;;;;;;;;;;;;;IAmBE;AAEF,gCAAiC,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../../../src/enums/test.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/enums/test.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copy-text-to-clipboard.d.ts","sourceRoot":"","sources":["../../src/helpers/copy-text-to-clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,kDAFW,MAAM,QAShB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features-to-geojson.d.ts","sourceRoot":"","sources":["../../src/helpers/features-to-geojson.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,6CAHW,OAAO,IAAI,EAAE,OAAO,EAAE,YACrB,UAAU,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAE,GAAG,CAAC;;GAK3D;oBAXmB,mBAAmB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features-to-wkt.d.ts","sourceRoot":"","sources":["../../src/helpers/features-to-wkt.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH,4BAFU,GAAG,CAAC,eAAe,CAAC,CAK5B;gBAVc,kBAAkB"}
@@ -5,7 +5,7 @@
5
5
  * @param {import("../main.js").EOxDrawTools} EOxDrawTool - The drawing tool instance.
6
6
  * @param {import("@eox/map").EOxMap} EOxMap - The EOx Map instance.
7
7
  */
8
- export function initMapDragDropImport(EOxDrawTool: import("../main.js").EOxDrawTools, EOxMap: import("@eox/map").EOxMap): void;
8
+ export function initMapDragDropImport(EOxDrawTool: import("../main.js").EOxDrawTools, EOxMap: any): void;
9
9
  /**
10
10
  * Handles file input from drag-and-drop or file selection events,
11
11
  * forwarding each file to a specified processing function.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-upload-events.d.ts","sourceRoot":"","sources":["../../src/helpers/generate-upload-events.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,mDAHW,OAAO,YAAY,EAAE,YAAY,qBA8B3C;AAaD;;;;;;GAMG;AACH,+BAHW,SAAS,IAAG,UAAU,GAAG;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,CAAA,eACrD,OAAO,YAAY,EAAE,YAAY,QAiB3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.js"],"names":[],"mappings":""}
@@ -17,7 +17,17 @@
17
17
  *
18
18
  * Usage examples and visual demos are available in Storybook stories, including scenarios for multi-feature drawing, feature modification, selection, import/export, continuous drawing, format and projection control, and style customization.
19
19
  *
20
+ * ## Methods
21
+ *
22
+ * - `startDrawing`: Triggers starting the drawing interaction on the map.
23
+ * - `discardDrawing`: Triggers discarding/stopping the drawing interaction and deleting the drawn shapes.
24
+ * - `removeFeature`: Removes a feature from the drawn features.
25
+ * - `removeFeatureByIndex`: Removes a feature from the drawn features by its index.
26
+ *
27
+ * Usage: `document.querySelector("eox-drawtools").startDrawing();`
28
+ *
20
29
  * @element eox-drawtools
30
+ * @fires {CustomEvent} drawupdate - Fires whenever features are added, modified or discarded
21
31
  */
22
32
  export class EOxDrawTools extends LitElement {
23
33
  static get properties(): {
@@ -123,7 +133,7 @@ export class EOxDrawTools extends LitElement {
123
133
  * The current native OpenLayers `draw` interaction
124
134
  * @type import("ol/interaction").Draw | import("@eox/map").EOxMap["selectInteractions"][string]
125
135
  */
126
- draw: import("ol/interaction").Draw | import("@eox/map").EOxMap["selectInteractions"][string];
136
+ draw: import("ol/interaction").Draw | any["selectInteractions"][string];
127
137
  /**
128
138
  * The current native OpenLayers draw `layer` (initialized with a `zIndex` of 100)
129
139
  * @type import("ol/layer/Vector").default
@@ -224,6 +234,7 @@ export class EOxDrawTools extends LitElement {
224
234
  /**
225
235
  * Used internally to update the drawnFeatures state without overwriting the map layer source.
226
236
  * @param {Array<import("ol").Feature>} features
237
+ * @ignore
227
238
  */
228
239
  setDrawnFeaturesInternal(features: Array<import("ol").Feature>): void;
229
240
  /**
@@ -238,56 +249,73 @@ export class EOxDrawTools extends LitElement {
238
249
  [x: string]: any;
239
250
  }>[];
240
251
  /**
241
- * @onClick Event handler triggered to start drawing on the map.
252
+ * Triggers starting the drawing interaction on the map.
242
253
  */
243
254
  startDrawing(): void;
244
255
  /**
245
- * @onClick Event handler triggered to discard/stop drawing
246
- * on the map and delete the drawn shapes.
256
+ * Triggers discarding/stopping the drawing interaction and deleting the drawn shapes.
247
257
  */
248
258
  discardDrawing(): void;
259
+ /**
260
+ * Removes a feature from the drawn features.
261
+ * @param {import("ol").Feature} feature - The feature to remove.
262
+ */
263
+ removeFeature(feature: import("ol").Feature): void;
264
+ /**
265
+ * Removes a feature from the drawn features by its index.
266
+ * @param {number} index - The index of the feature to remove.
267
+ */
268
+ removeFeatureByIndex(index: number): void;
249
269
  /**
250
270
  * @param {string} text - The string representation of the features to be parsed.
251
271
  * @param {boolean} replaceFeatures - A boolean flag indicating whether to replace the existing features.
252
272
  * @param {boolean} animate - A boolean flag indicating whether to animate the map on feature change.
273
+ * @ignore
253
274
  */
254
275
  handleFeatureChange(text: string, replaceFeatures?: boolean, animate?: boolean): void;
255
276
  /**
256
277
  * @param {DragEvent | InputEvent & { target: HTMLInputElement }} evt - The event object from the file input interaction.
278
+ * @ignore
257
279
  */
258
280
  handleFilesChange(evt: DragEvent | (InputEvent & {
259
281
  target: HTMLInputElement;
260
282
  })): void;
261
283
  /**
262
284
  * @event onModifyEnd triggered when the modification of a shape is completed.
285
+ * @ignore
263
286
  */
264
287
  onModifyEnd(): void;
265
288
  /**
266
289
  * Update #geoJSON with stringify feature.
290
+ * @ignore
267
291
  */
268
292
  updateGeoJSON(): void;
269
293
  /**
270
294
  * Triggers different events when the drawing of a shape is completed.
295
+ * @ignore
271
296
  */
272
297
  emitDrawnFeatures(): void;
273
298
  /**
274
299
  * initializes the EOxMap and OlMap instances
275
300
  * And stores them in the private properties #eoxMap and #olMap, respectively.
301
+ * @ignore
276
302
  */
277
303
  updateLayer(): void;
278
304
  resetLayer: (EoxDrawTool: import("./main").EOxDrawTools) => void;
279
- set eoxMap(value: import("@eox/map").EOxMap);
305
+ set eoxMap(value: any);
280
306
  /**
281
307
  * The eox-map instance associated with the draw tools
282
308
  * @type {import("@eox/map").EOxMap}
283
309
  */
284
- get eoxMap(): import("@eox/map").EOxMap;
310
+ get eoxMap(): any;
285
311
  /**
286
312
  * initializes the EOxMap and OlMap instances
287
313
  * And stores them in the private properties #eoxMap and #olMap, respectively.
288
314
  * It then calls requestUpdate to trigger a re-render.
315
+ * @ignore
289
316
  */
290
317
  firstUpdated(): void;
318
+ /** @ignore */
291
319
  updated(changedProperties: any): void;
292
320
  render(): import("lit-html").TemplateResult<1>;
293
321
  #private;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyBC;IA4CC;;OAEG;IACH,qBAAwB;IAExB;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;OAEG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,MAFS,OAAO,gBAAgB,EAAE,IAAI,GAAG,GAAyB,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhF;IAEhB;;;OAGG;IAEH,WAHS,OAAO,iBAAiB,EAAE,OAAO,CAGrB;IA8JvB;;;OAGG;IACH,2BAGC;IAED,sBAEC;IAlKC;;OAEG;IACH,oBAA4B;IAE5B;;OAEG;IACH,oBAA0B;IAE1B;;;;;;;OAOG;IACH,eANU;QACP,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;QAC7C,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;QAC7C,KAAK,CAAC,EAAE,OAAO,eAAe,EAAE,aAAa,CAAA;KAC5C,GAAG,IAAI,CAEc;IAEzB;;;OAGG;IACH,QAFS,OAAO,gBAAgB,EAAE,MAAM,CAEtB;IAElB;;OAEG;IACH,0BAA6B;IAE7B;;;;;OAKG;IACH,iBAAoB;IAEpB;;OAEG;IACH,wBAA2B;IAE3B;;OAEG;IACH,oBAAuB;IAEvB;;OAEG;IACH,kBAAqB;IACrB;;OAEG;IACH,mBAA6B;IAE7B;;;OAGG;IACH,MAFU,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,GAAG,KAAK,CAE1C;IAErB;;OAEG;IACH,iBAFU,UAAU,CAAC,cAAc,sCAAsC,EAAE,OAAO,CAAC,CAExD;IAE3B;;;;;OAKG;IACH,QAFU,SAAS,GAAE,SAAS,GAAG,KAAK,CAEf;IAEvB;;OAEG;IACH,kBAAqB;IAErB;;;;OAIG;IACH,kBAAqB;IAGvB;;;;OAIG;IACH,+BAGC;IAED,0BAEC;IAED;;;;OAIG;IACH,mCAHW,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,QAOrC;IAED;;;;OAIG;IACH;;UAyBC;IAED;;SAEC;IAeD;;OAEG;IACH,qBAEC;IAED;;OAEG;IACH,uBAEC;IAED;;;OAGG;IACH,uBAFW,OAAO,IAAI,EAAE,OAAO,QAI9B;IAED;;;OAGG;IACH,4BAFW,MAAM,QAIhB;IAED;;;;;OAKG;IACH,0BALW,MAAM,oBACN,OAAO,YACP,OAAO,QAWjB;IAED;;;OAGG;IACH,uBAHW,SAAS,IAAG,UAAU,GAAG;QAAE,MAAM,EAAE,gBAAgB,CAAA;KAAE,CAAA,QAK/D;IAED;;;OAGG;IACH,oBAEC;IAED;;;OAGG;IACH,sBAMC;IAED;;;OAGG;IACH,0BAaC;IAUD;;;;OAIG;IACH,oBAWC;IAHC,iEAAuB;IAkDzB,uBAIC;IAZD;;;OAGG;IACH,kBAEC;IA3CD;;;;;OAKG;IACH,qBAYC;IAED,cAAc;IACd,sCAcC;IAiCD,+CAqDC;;CACF;2BApjByC,KAAK"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/controller/index.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-button-states.d.ts","sourceRoot":"","sources":["../../../src/methods/controller/update-button-states.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,iEAHW,OAAO,6BAA6B,EAAE,sBAAsB,GAC1D;IAAE,YAAY,EAAE,OAAO,GAAG,iCAAqB,CAAC;IAAC,eAAe,EAAE,OAAO,GAAG,iCAAqB,CAAA;CAAE,CAgB/G"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-select-handler.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/create-select-handler.js"],"names":[],"mappings":";AAMA;;;EAgDC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discard-drawing.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/discard-drawing.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,mDAFW,OAAO,YAAY,EAAE,YAAY,QAyB3C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emit-drawn-features.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/emit-drawn-features.js"],"names":[],"mappings":";;;;yBAGa,OAAO,IAAI,EAAE,OAAO,EAAE,GAC9B,UAAU,CAAC,OAAO,iBAAiB,CAAC,GACpC,UAAU,CAAC,OAAO,aAAa,CAAC;AAHrC;;;;GAIG;AAEH;;;;;GAKG;AACH,sDAHW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,QAqDpC;kCAjEgD,eAAe;8BAAf,eAAe"}
@@ -8,5 +8,5 @@ export default handleLayerId;
8
8
  * @param {string} updatedLayerId
9
9
  * @returns
10
10
  */
11
- declare function handleLayerId(EoxDrawTool: import("../../main").EOxDrawTools, EoxMap: import("@eox/map").EOxMap, updatedLayerId: string, oldLayerId: string): void;
11
+ declare function handleLayerId(EoxDrawTool: import("../../main").EOxDrawTools, EoxMap: any, updatedLayerId: string, oldLayerId: string): void;
12
12
  //# sourceMappingURL=handle-layer-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handle-layer-id.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/handle-layer-id.js"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AACH,4CANW,OAAO,YAAY,EAAE,YAAY,+BAGjC,MAAM,cADN,MAAM,QAuBhB"}
@@ -6,5 +6,7 @@ export { default as emitDrawnFeaturesMethod } from "./emit-drawn-features";
6
6
  export { default as createSelectHandler } from "./create-select-handler";
7
7
  export { default as initSelection } from "./init-selection";
8
8
  export { default as handleLayerId } from "./handle-layer-id";
9
+ export { default as onKeyDownMethod } from "./on-key-down.js";
9
10
  export { default as initMeasuring, updateMeasure } from "./init-measuring";
11
+ export { removeFeatureMethod, removeFeatureByIndexMethod } from "./remove-feature";
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../map/src/enums/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/index.js"],"names":[],"mappings":""}
@@ -6,8 +6,8 @@ export default initLayerMethod;
6
6
  * @param {Boolean} multipleFeatures - Allow adding more than one feature at a time
7
7
  */
8
8
  declare function initLayerMethod(EoxDrawTool: import("../../main").EOxDrawTools, multipleFeatures: boolean): {
9
- EoxMap: import("@eox/map").EOxMap;
10
- OlMap: import("ol").Map;
9
+ EoxMap: any;
10
+ OlMap: any;
11
11
  reset: (EoxDrawTool: import("../../main").EOxDrawTools) => void;
12
12
  };
13
13
  //# sourceMappingURL=init-layer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-layer.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/init-layer.js"],"names":[],"mappings":";AAMA;;;;;GAKG;AACH,8CAHW,OAAO,YAAY,EAAE,YAAY;;;yBAsI/B,OAAO,YAAY,EAAE,YAAY;EAqB7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-measuring.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/init-measuring.js"],"names":[],"mappings":"AAKO,uCAFI,OAAO,IAAI,EAAE,OAAO,QAoC9B;;AAED;;;;;GAKG;AACH,4CAFW,OAAO,YAAY,EAAE,YAAY,QAqB3C"}
@@ -6,5 +6,5 @@ export default initSelection;
6
6
  * @param {import("@eox/map").EOxMap} EoxMap - The map instance.
7
7
  * @param {string} layerId - The ID of the layer to initialize selection for.
8
8
  */
9
- declare function initSelection(EoxDrawTool: import("../../main").EOxDrawTools, EoxMap: import("@eox/map").EOxMap, layerId: string): void;
9
+ declare function initSelection(EoxDrawTool: import("../../main").EOxDrawTools, EoxMap: any, layerId: string): void;
10
10
  //# sourceMappingURL=init-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-selection.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/init-selection.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,4CAJW,OAAO,YAAY,EAAE,YAAY,wBAEjC,MAAM,QA+DhB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-draw-end.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/on-draw-end.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,8CAFW,OAAO,YAAY,EAAE,YAAY,QAiC3C"}
@@ -0,0 +1,10 @@
1
+ export default onKeyDownMethod;
2
+ /**
3
+ * Handles keydown events for the drawing tool.
4
+ * Specifically, it aborts the drawing process when the Escape key is pressed.
5
+ *
6
+ * @param {KeyboardEvent} event - The keyboard event.
7
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
8
+ */
9
+ declare function onKeyDownMethod(event: KeyboardEvent, EoxDrawTool: import("../../main").EOxDrawTools): void;
10
+ //# sourceMappingURL=on-key-down.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"on-key-down.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/on-key-down.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,wCAHW,aAAa,eACb,OAAO,YAAY,EAAE,YAAY,QAQ3C"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Removes a feature from the drawn features.
3
+ *
4
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
5
+ * @param {import("ol").Feature} feature - The feature to remove.
6
+ */
7
+ export function removeFeatureMethod(EoxDrawTool: import("../../main").EOxDrawTools, feature: import("ol").Feature): void;
8
+ /**
9
+ * Removes a feature from the drawn features by its index.
10
+ *
11
+ * @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
12
+ * @param {number} index - The index of the feature to remove.
13
+ */
14
+ export function removeFeatureByIndexMethod(EoxDrawTool: import("../../main").EOxDrawTools, index: number): void;
15
+ //# sourceMappingURL=remove-feature.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-feature.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/remove-feature.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,iDAHW,OAAO,YAAY,EAAE,YAAY,WACjC,OAAO,IAAI,EAAE,OAAO,QAO9B;AAED;;;;;GAKG;AACH,wDAHW,OAAO,YAAY,EAAE,YAAY,SACjC,MAAM,QAShB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-drawing.d.ts","sourceRoot":"","sources":["../../../src/methods/draw/start-drawing.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,iDAFW,OAAO,YAAY,EAAE,YAAY,QAqB3C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-feature.d.ts","sourceRoot":"","sources":["../../../src/methods/list/delete-feature.js"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,0CAHW,KAAK,GAAG;IAAE,MAAM,EAAE,iBAAiB,CAAA;CAAE,mBACrC,OAAO,uBAAuB,EAAE,gBAAgB,0BAkB1D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"first-update.d.ts","sourceRoot":"","sources":["../../../src/methods/list/first-update.js"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,qDAFW,OAAO,uBAAuB,EAAE,gBAAgB,QAyB1D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hover-feature.d.ts","sourceRoot":"","sources":["../../../src/methods/list/hover-feature.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,qDAJW,OAAO,uBAAuB,EAAE,gBAAgB,aAChD,MAAM,GAAG,MAAM,GAAG,SAAS,2BAUrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../map/src/helpers/index.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/methods/list/index.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-deselect-feature.d.ts","sourceRoot":"","sources":["../../../src/methods/list/select-deselect-feature.js"],"names":[],"mappings":";AAEA;;;;;GAKG;AACH,mDAHW,OAAO,IAAI,EAAE,OAAO,mBACpB,OAAO,uBAAuB,EAAE,gBAAgB,QA2B1D"}