@eox/drawtools 0.13.5 → 0.14.1-dev.1740731700.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.
- package/dist/eox-drawtools.js +334 -323
- package/dist/eox-drawtools.umd.cjs +25 -21
- package/package.json +4 -4
- package/src/components/list.js +18 -2
- package/src/enums/draw.js +4 -1
- package/src/main.js +11 -2
- package/src/methods/draw/create-select-handler.js +4 -4
- package/src/methods/draw/emit-drawn-features.js +9 -2
- package/src/methods/draw/on-draw-end.js +12 -6
- package/src/methods/list/select-deselect-feature.js +8 -3
- package/types/drawtools/src/components/list.d.ts +17 -0
- package/types/drawtools/src/components/list.d.ts.map +1 -1
- package/types/drawtools/src/enums/draw.d.ts +1 -0
- package/types/drawtools/src/main.d.ts +10 -1
- package/types/drawtools/src/main.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/create-select-handler.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts +2 -1
- package/types/drawtools/src/methods/draw/emit-drawn-features.d.ts.map +1 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts +2 -1
- package/types/drawtools/src/methods/draw/on-draw-end.d.ts.map +1 -1
- package/types/drawtools/src/methods/list/select-deselect-feature.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eox/drawtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1-dev.1740731700.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@eox/map": "^1.19.3",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"src"
|
|
17
17
|
],
|
|
18
18
|
"main": "./src/main.js",
|
|
19
|
-
"types": "./types/main.d.ts",
|
|
19
|
+
"types": "./types/drawtools/src/main.d.ts",
|
|
20
20
|
"typesVersions": {
|
|
21
21
|
"*": {
|
|
22
22
|
".": [
|
|
23
|
-
"./types/main.d.ts"
|
|
23
|
+
"./types/drawtools/src/main.d.ts"
|
|
24
24
|
],
|
|
25
25
|
"src/*": [
|
|
26
|
-
"./types/*"
|
|
26
|
+
"./types/drawtools/src/*"
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
},
|
package/src/components/list.js
CHANGED
|
@@ -15,11 +15,13 @@ import listStyle from "@eox/elements-utils/styles/dist/list.style";
|
|
|
15
15
|
*/
|
|
16
16
|
export class EOxDrawToolsList extends LitElement {
|
|
17
17
|
static properties = {
|
|
18
|
+
eoxDrawTools: { attribute: false, state: true },
|
|
18
19
|
eoxMap: { attribute: false, state: true },
|
|
19
20
|
olMap: { attribute: false, state: true },
|
|
20
21
|
draw: { attribute: false, state: true },
|
|
21
22
|
drawLayer: { attribute: false, state: true },
|
|
22
23
|
drawnFeatures: { attribute: false, state: true, type: Array },
|
|
24
|
+
featureName: { attribute: false, state: true, type: String },
|
|
23
25
|
modify: { attribute: false, state: true },
|
|
24
26
|
unstyled: { type: Boolean },
|
|
25
27
|
};
|
|
@@ -47,6 +49,11 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
47
49
|
constructor() {
|
|
48
50
|
super();
|
|
49
51
|
|
|
52
|
+
/**
|
|
53
|
+
* @type import("../main").EOxDrawTools;
|
|
54
|
+
*/
|
|
55
|
+
this.eoxDrawTools = null;
|
|
56
|
+
|
|
50
57
|
/**
|
|
51
58
|
* @type import("@eox/map").EOxMap
|
|
52
59
|
*/
|
|
@@ -79,6 +86,11 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
79
86
|
*/
|
|
80
87
|
this.drawnFeatures = [];
|
|
81
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Default display name for features
|
|
91
|
+
*/
|
|
92
|
+
this.featureName = "Feature";
|
|
93
|
+
|
|
82
94
|
/**
|
|
83
95
|
* The current native OpenLayers `modify` interaction
|
|
84
96
|
* @type import("ol/interaction").Modify
|
|
@@ -147,7 +159,9 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
147
159
|
${this.drawnFeatures.map((feature, i) => {
|
|
148
160
|
// Determine feature number and ID
|
|
149
161
|
const featureNumber = i + 1;
|
|
150
|
-
const featureId =
|
|
162
|
+
const featureId = Object.values(
|
|
163
|
+
this.eoxMap.selectInteractions,
|
|
164
|
+
)[0].getId(feature);
|
|
151
165
|
|
|
152
166
|
// Check if the feature is hovered or clicked
|
|
153
167
|
const isFeatureHovered = this.hoverId === featureId;
|
|
@@ -168,7 +182,9 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
168
182
|
@click="${() =>
|
|
169
183
|
this._handleFeatureSelectAndDeselect(feature)}"
|
|
170
184
|
>
|
|
171
|
-
<span class="title"
|
|
185
|
+
<span class="title"
|
|
186
|
+
>${this.featureName} ${featureNumber}</span
|
|
187
|
+
>
|
|
172
188
|
<button
|
|
173
189
|
index=${i}
|
|
174
190
|
class="icon smallest discard"
|
package/src/enums/draw.js
CHANGED
package/src/main.js
CHANGED
|
@@ -33,6 +33,7 @@ export class EOxDrawTools extends LitElement {
|
|
|
33
33
|
draw: { attribute: false, state: true },
|
|
34
34
|
drawLayer: { attribute: false, state: true },
|
|
35
35
|
drawnFeatures: { attribute: false, state: true, type: Array },
|
|
36
|
+
featureName: { attribute: "feature-name", type: String },
|
|
36
37
|
layerId: { attribute: "layer-id", type: String },
|
|
37
38
|
featureStyles: { attribute: false },
|
|
38
39
|
modify: { attribute: false, state: true },
|
|
@@ -117,6 +118,11 @@ export class EOxDrawTools extends LitElement {
|
|
|
117
118
|
*/
|
|
118
119
|
this.drawnFeatures = [];
|
|
119
120
|
|
|
121
|
+
/**
|
|
122
|
+
* The display name of drawn features, shown e.g. in the feature list.
|
|
123
|
+
*/
|
|
124
|
+
this.featureName = "Feature";
|
|
125
|
+
|
|
120
126
|
/**
|
|
121
127
|
* Flat styles for the drawn/selected features
|
|
122
128
|
* @type {{
|
|
@@ -271,8 +277,9 @@ export class EOxDrawTools extends LitElement {
|
|
|
271
277
|
|
|
272
278
|
/**
|
|
273
279
|
* Triggers different events when the drawing of a shape is completed.
|
|
280
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
274
281
|
*/
|
|
275
|
-
emitDrawnFeatures() {
|
|
282
|
+
emitDrawnFeatures(selectedFeature) {
|
|
276
283
|
/**
|
|
277
284
|
* @param {import("./methods/draw/emit-drawn-features").EmitFormat} value
|
|
278
285
|
*/
|
|
@@ -284,7 +291,7 @@ export class EOxDrawTools extends LitElement {
|
|
|
284
291
|
*/
|
|
285
292
|
this.dispatchEvent(new CustomEvent("drawupdate", { detail: value }));
|
|
286
293
|
};
|
|
287
|
-
emitDrawnFeaturesMethod(this, drawUpdateEvent);
|
|
294
|
+
emitDrawnFeaturesMethod(this, drawUpdateEvent, selectedFeature);
|
|
288
295
|
}
|
|
289
296
|
|
|
290
297
|
/**
|
|
@@ -364,11 +371,13 @@ export class EOxDrawTools extends LitElement {
|
|
|
364
371
|
<!-- List Component -->
|
|
365
372
|
${this.showList && this.drawnFeatures?.length
|
|
366
373
|
? html`<eox-drawtools-list
|
|
374
|
+
.eoxDrawTools=${this}
|
|
367
375
|
.eoxMap=${this.eoxMap}
|
|
368
376
|
.olMap=${this.#olMap}
|
|
369
377
|
.draw=${this.draw}
|
|
370
378
|
.drawLayer=${this.drawLayer}
|
|
371
379
|
.drawnFeatures=${this.drawnFeatures}
|
|
380
|
+
.featureName=${this.featureName}
|
|
372
381
|
.modify=${this.modify}
|
|
373
382
|
.unstyled=${this.unstyled}
|
|
374
383
|
@changed=${() => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { onDrawEndMethod } from "./";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Factory function to create a select event handler
|
|
3
5
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
@@ -13,10 +15,8 @@ const createSelectHandler = (EoxDrawTool) => {
|
|
|
13
15
|
if (e?.detail.id !== "SelectLayerClickInteraction" || !e.detail.feature) {
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
|
-
EoxDrawTool.
|
|
17
|
-
EoxDrawTool.
|
|
18
|
-
new CustomEvent("addfeatures", { detail: e.detail }),
|
|
19
|
-
);
|
|
18
|
+
EoxDrawTool.drawnFeatures.push(e.detail.feature);
|
|
19
|
+
onDrawEndMethod(EoxDrawTool, e.detail.feature);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -11,12 +11,19 @@ import { featuresToGeoJson, featuresToWKT } from "../../helpers";
|
|
|
11
11
|
*
|
|
12
12
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
13
13
|
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
14
|
+
* @param {import("ol").Feature} [selectedFeature] - The feature that was selected by the user.
|
|
14
15
|
*/
|
|
15
|
-
const emitDrawnFeaturesMethod = (
|
|
16
|
+
const emitDrawnFeaturesMethod = (
|
|
17
|
+
EoxDrawTool,
|
|
18
|
+
drawUpdateEvent,
|
|
19
|
+
selectedFeature,
|
|
20
|
+
) => {
|
|
16
21
|
// Function to emit features after a timeout (ensures update)
|
|
17
22
|
const emitFeatures = () => {
|
|
18
23
|
// Update drawnFeatures with features from drawLayer's source
|
|
19
|
-
const drawnFeatures =
|
|
24
|
+
const drawnFeatures = selectedFeature
|
|
25
|
+
? EoxDrawTool.drawnFeatures
|
|
26
|
+
: EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
20
27
|
// Transform drawn features to the desired projection
|
|
21
28
|
const source = EoxDrawTool.eoxMap.projection || "EPSG:3857";
|
|
22
29
|
// has a default value of EPSG:4326
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* emits drawn features, deactivates drawing, and requests an update.
|
|
4
4
|
*
|
|
5
5
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
6
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
6
7
|
*/
|
|
7
|
-
const onDrawEndMethod = (EoxDrawTool) => {
|
|
8
|
+
const onDrawEndMethod = (EoxDrawTool, selectedFeature) => {
|
|
8
9
|
// Function to handle actions when drawing ends
|
|
9
10
|
const handleDrawEnd = () => {
|
|
10
|
-
EoxDrawTool.emitDrawnFeatures(); // Emit drawn features
|
|
11
|
+
EoxDrawTool.emitDrawnFeatures(selectedFeature); // Emit drawn features
|
|
11
12
|
if (!EoxDrawTool.multipleFeatures) {
|
|
12
13
|
EoxDrawTool.draw.setActive(false); // Deactivate drawing
|
|
13
14
|
EoxDrawTool.selectionEvents.removeSelectionEvent();
|
|
@@ -19,10 +20,15 @@ const onDrawEndMethod = (EoxDrawTool) => {
|
|
|
19
20
|
EoxDrawTool.drawLayer.getSource().clear(true);
|
|
20
21
|
EoxDrawTool.drawnFeatures = [];
|
|
21
22
|
} else {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
let latest;
|
|
24
|
+
if (selectedFeature) {
|
|
25
|
+
latest = EoxDrawTool.drawnFeatures.at(-1);
|
|
26
|
+
} else {
|
|
27
|
+
const features = EoxDrawTool.drawLayer.getSource().getFeatures();
|
|
28
|
+
latest = features.at(-1);
|
|
29
|
+
EoxDrawTool.drawLayer.getSource().clear(true);
|
|
30
|
+
EoxDrawTool.drawLayer.getSource().addFeature(latest);
|
|
31
|
+
}
|
|
26
32
|
EoxDrawTool.drawnFeatures = [latest];
|
|
27
33
|
}
|
|
28
34
|
}
|
|
@@ -7,11 +7,10 @@ import { FIT_OPTIONS } from "../../enums";
|
|
|
7
7
|
* @param {import("../../components/list").EOxDrawToolsList} EoxDrawToolList - The list of drawn features.
|
|
8
8
|
*/
|
|
9
9
|
const selectAndDeselectFeature = (feature, EoxDrawToolList) => {
|
|
10
|
-
const selectedFeatureId = feature.getId();
|
|
11
10
|
const { clickId, drawLayer, olMap, clickInteraction } = EoxDrawToolList;
|
|
11
|
+
const selectedFeatureId = clickInteraction.getId(feature);
|
|
12
12
|
|
|
13
13
|
const isSelectedFeature = clickId === selectedFeatureId;
|
|
14
|
-
const featureGeometry = feature.getGeometry();
|
|
15
14
|
|
|
16
15
|
if (isSelectedFeature) {
|
|
17
16
|
// Deselect the selected feature and fit the view to its extent
|
|
@@ -20,7 +19,13 @@ const selectAndDeselectFeature = (feature, EoxDrawToolList) => {
|
|
|
20
19
|
clickInteraction.highlightById([]);
|
|
21
20
|
} else {
|
|
22
21
|
// Select the clicked feature and fit the view to its extent
|
|
23
|
-
const
|
|
22
|
+
const source = EoxDrawToolList.eoxMap.projection || "EPSG:3857";
|
|
23
|
+
const destination = EoxDrawToolList.eoxDrawTools.projection;
|
|
24
|
+
const featureExtent = feature
|
|
25
|
+
.clone()
|
|
26
|
+
.getGeometry()
|
|
27
|
+
.transform(destination, source)
|
|
28
|
+
.getExtent();
|
|
24
29
|
clickInteraction.highlightById([selectedFeatureId]);
|
|
25
30
|
olMap.getView().fit(featureExtent, FIT_OPTIONS);
|
|
26
31
|
}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export class EOxDrawToolsList extends LitElement {
|
|
7
7
|
static properties: {
|
|
8
|
+
eoxDrawTools: {
|
|
9
|
+
attribute: boolean;
|
|
10
|
+
state: boolean;
|
|
11
|
+
};
|
|
8
12
|
eoxMap: {
|
|
9
13
|
attribute: boolean;
|
|
10
14
|
state: boolean;
|
|
@@ -26,6 +30,11 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
26
30
|
state: boolean;
|
|
27
31
|
type: ArrayConstructor;
|
|
28
32
|
};
|
|
33
|
+
featureName: {
|
|
34
|
+
attribute: boolean;
|
|
35
|
+
state: boolean;
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
29
38
|
modify: {
|
|
30
39
|
attribute: boolean;
|
|
31
40
|
state: boolean;
|
|
@@ -50,6 +59,10 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
50
59
|
* @type string | number
|
|
51
60
|
*/
|
|
52
61
|
clickId: string | number;
|
|
62
|
+
/**
|
|
63
|
+
* @type import("../main").EOxDrawTools;
|
|
64
|
+
*/
|
|
65
|
+
eoxDrawTools: import("../main").EOxDrawTools;
|
|
53
66
|
/**
|
|
54
67
|
* @type import("@eox/map").EOxMap
|
|
55
68
|
*/
|
|
@@ -75,6 +88,10 @@ export class EOxDrawToolsList extends LitElement {
|
|
|
75
88
|
* @type Array<import("ol").Feature>
|
|
76
89
|
*/
|
|
77
90
|
drawnFeatures: Array<import("ol").Feature>;
|
|
91
|
+
/**
|
|
92
|
+
* Default display name for features
|
|
93
|
+
*/
|
|
94
|
+
featureName: string;
|
|
78
95
|
/**
|
|
79
96
|
* The current native OpenLayers `modify` interaction
|
|
80
97
|
* @type import("ol/interaction").Modify
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/components/list.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;IACE
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/components/list.js"],"names":[],"mappings":"AAUA;;;;GAIG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUE;IAEF;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhD;IAEjB;;OAEG;IACH,kBAFU,OAAO,UAAU,EAAE,MAAM,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,QAFS,OAAO,UAAU,EAAE,MAAM,CAEhB;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;;;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,+CAqDC;CACF;2BA1MyC,KAAK"}
|
|
@@ -33,6 +33,10 @@ export class EOxDrawTools extends LitElement {
|
|
|
33
33
|
state: boolean;
|
|
34
34
|
type: ArrayConstructor;
|
|
35
35
|
};
|
|
36
|
+
featureName: {
|
|
37
|
+
attribute: string;
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
};
|
|
36
40
|
layerId: {
|
|
37
41
|
attribute: string;
|
|
38
42
|
type: StringConstructor;
|
|
@@ -112,6 +116,10 @@ export class EOxDrawTools extends LitElement {
|
|
|
112
116
|
* @type Array<import("ol").Feature>
|
|
113
117
|
*/
|
|
114
118
|
drawnFeatures: Array<import("ol").Feature>;
|
|
119
|
+
/**
|
|
120
|
+
* The display name of drawn features, shown e.g. in the feature list.
|
|
121
|
+
*/
|
|
122
|
+
featureName: string;
|
|
115
123
|
/**
|
|
116
124
|
* Flat styles for the drawn/selected features
|
|
117
125
|
* @type {{
|
|
@@ -211,8 +219,9 @@ export class EOxDrawTools extends LitElement {
|
|
|
211
219
|
updateGeoJSON(): void;
|
|
212
220
|
/**
|
|
213
221
|
* Triggers different events when the drawing of a shape is completed.
|
|
222
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
214
223
|
*/
|
|
215
|
-
emitDrawnFeatures(): void;
|
|
224
|
+
emitDrawnFeatures(selectedFeature?: import("ol/Feature").default): void;
|
|
216
225
|
/**
|
|
217
226
|
* initializes the EOxMap and OlMap instances
|
|
218
227
|
* And stores them in the private properties #eoxMap and #olMap, respectively.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;IAEE
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;IAEE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuBC;IA6BC;;OAEG;IACH,qBAAwB;IAExB;;;;;OAKG;IACH,KAFU,SAAO,WAAW,CAER;IAEpB;;OAEG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,MAFS,OAAO,gBAAgB,EAAE,IAAI,GAAG,OAAO,UAAU,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAEhF;IAEhB;;;OAGG;IAEH,WAHS,OAAO,iBAAiB,EAAE,OAAO,CAGrB;IAwGvB;;;OAGG;IACH,2BAGC;IAED,sBAEC;IA5GC;;;OAGG;IACH,eAFS,KAAK,CAAC,OAAO,IAAI,EAAE,OAAO,CAAC,CAEb;IAEvB;;OAEG;IACH,oBAA4B;IAE5B;;;;;;;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;;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;;OAEG;IACH,qBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,0BAHW,MAAM,oBACN,OAAO,QASjB;IAED;;OAEG;IACH,uBAFW,SAAS,QAInB;IAED;;OAEG;IACH,oBAEC;IAED;;OAEG;IACH,sBAMC;IAED;;;OAGG;IACH,oCAFW,OAAO,YAAY,EAAE,OAAO,QAetC;IASD;;;;OAIG;IACH,qBAUC;IAcD,6CAIC;IARD,wCAEC;IAVD,sCAMC;IAiBD,+CA8CC;;CACF;2BAtYyC,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-select-handler.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/create-select-handler.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"create-select-handler.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/create-select-handler.js"],"names":[],"mappings":";AAEA;;;GAGG;AACH,kDAFW,OAAO,YAAY,EAAE,YAAY;;;EA2C3C"}
|
|
@@ -13,8 +13,9 @@ export type EmitFormat = import("ol").Feature[] | ReturnType<typeof featuresToGe
|
|
|
13
13
|
*
|
|
14
14
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
15
15
|
* @param {(value:EmitFormat) => void} drawUpdateEvent - event to be triggered after drawFeature is updated
|
|
16
|
+
* @param {import("ol").Feature} [selectedFeature] - The feature that was selected by the user.
|
|
16
17
|
*/
|
|
17
|
-
declare function emitDrawnFeaturesMethod(EoxDrawTool: import("../../main").EOxDrawTools, drawUpdateEvent: (value: EmitFormat) => void): void;
|
|
18
|
+
declare function emitDrawnFeaturesMethod(EoxDrawTool: import("../../main").EOxDrawTools, drawUpdateEvent: (value: EmitFormat) => void, selectedFeature?: import("ol").Feature): void;
|
|
18
19
|
import { featuresToGeoJson } from "../../helpers";
|
|
19
20
|
import { featuresToWKT } from "../../helpers";
|
|
20
21
|
//# sourceMappingURL=emit-drawn-features.d.ts.map
|
|
@@ -1 +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
|
|
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;;;;;;GAMG;AACH,sDAJW,OAAO,YAAY,EAAE,YAAY,mBACjC,CAAC,KAAK,EAAC,UAAU,KAAK,IAAI,oBAC1B,OAAO,IAAI,EAAE,OAAO,QAqD9B;kCAlEgD,eAAe;8BAAf,eAAe"}
|
|
@@ -4,6 +4,7 @@ export default onDrawEndMethod;
|
|
|
4
4
|
* emits drawn features, deactivates drawing, and requests an update.
|
|
5
5
|
*
|
|
6
6
|
* @param {import("../../main").EOxDrawTools} EoxDrawTool - The drawing tool instance.
|
|
7
|
+
* @param {import("ol/Feature").default} [selectedFeature] - The feature that was selected by the user.
|
|
7
8
|
*/
|
|
8
|
-
declare function onDrawEndMethod(EoxDrawTool: import("../../main").EOxDrawTools): void;
|
|
9
|
+
declare function onDrawEndMethod(EoxDrawTool: import("../../main").EOxDrawTools, selectedFeature?: import("ol/Feature").default): void;
|
|
9
10
|
//# sourceMappingURL=on-draw-end.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-draw-end.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/on-draw-end.js"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"on-draw-end.d.ts","sourceRoot":"","sources":["../../../../../src/methods/draw/on-draw-end.js"],"names":[],"mappings":";AAAA;;;;;;GAMG;AACH,8CAHW,OAAO,YAAY,EAAE,YAAY,oBACjC,OAAO,YAAY,EAAE,OAAO,QAmCtC"}
|
|
@@ -1 +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,
|
|
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"}
|