@octostar/map-component 0.1.19 → 0.1.20
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/index.cjs +36 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +36 -27
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/map-editor-canvas.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8247,22 +8247,25 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
8247
8247
|
} catch (err) {
|
|
8248
8248
|
}
|
|
8249
8249
|
});
|
|
8250
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8251
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8252
8250
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8253
|
-
if (
|
|
8254
|
-
onSelectionComplete
|
|
8251
|
+
if (isFilterAction) {
|
|
8252
|
+
if (onSelectionComplete) {
|
|
8253
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8254
|
+
}
|
|
8255
|
+
if (persistSelection) {
|
|
8256
|
+
setPersistedSelectionPolygon([
|
|
8257
|
+
[minLng, maxLat],
|
|
8258
|
+
[maxLng, maxLat],
|
|
8259
|
+
[maxLng, minLat],
|
|
8260
|
+
[minLng, minLat],
|
|
8261
|
+
[minLng, maxLat]
|
|
8262
|
+
]);
|
|
8263
|
+
}
|
|
8264
|
+
} else {
|
|
8265
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8266
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8255
8267
|
}
|
|
8256
8268
|
setIsSelectionToolActive(false);
|
|
8257
|
-
if (persistSelection && isFilterAction) {
|
|
8258
|
-
setPersistedSelectionPolygon([
|
|
8259
|
-
[minLng, maxLat],
|
|
8260
|
-
[maxLng, maxLat],
|
|
8261
|
-
[maxLng, minLat],
|
|
8262
|
-
[minLng, minLat],
|
|
8263
|
-
[minLng, maxLat]
|
|
8264
|
-
]);
|
|
8265
|
-
}
|
|
8266
8269
|
startPoint = null;
|
|
8267
8270
|
setSelectionPoints([]);
|
|
8268
8271
|
} else if (selectionMode === "circle" && isDrawingSelection.current && startPoint) {
|
|
@@ -8297,16 +8300,19 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
8297
8300
|
} catch (err) {
|
|
8298
8301
|
}
|
|
8299
8302
|
});
|
|
8300
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8301
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8302
8303
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8303
|
-
if (
|
|
8304
|
-
onSelectionComplete
|
|
8304
|
+
if (isFilterAction) {
|
|
8305
|
+
if (onSelectionComplete) {
|
|
8306
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8307
|
+
}
|
|
8308
|
+
if (persistSelection) {
|
|
8309
|
+
setPersistedSelectionPolygon(selectionPolygon.geometry.coordinates[0]);
|
|
8310
|
+
}
|
|
8311
|
+
} else {
|
|
8312
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8313
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8305
8314
|
}
|
|
8306
8315
|
setIsSelectionToolActive(false);
|
|
8307
|
-
if (persistSelection && isFilterAction) {
|
|
8308
|
-
setPersistedSelectionPolygon(selectionPolygon.geometry.coordinates[0]);
|
|
8309
|
-
}
|
|
8310
8316
|
}
|
|
8311
8317
|
startPoint = null;
|
|
8312
8318
|
setSelectionPoints([]);
|
|
@@ -8352,16 +8358,19 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
8352
8358
|
} catch (err) {
|
|
8353
8359
|
}
|
|
8354
8360
|
});
|
|
8355
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8356
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8357
8361
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8358
|
-
if (
|
|
8359
|
-
onSelectionComplete
|
|
8362
|
+
if (isFilterAction) {
|
|
8363
|
+
if (onSelectionComplete) {
|
|
8364
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8365
|
+
}
|
|
8366
|
+
if (persistSelection) {
|
|
8367
|
+
setPersistedSelectionPolygon(closedPoints);
|
|
8368
|
+
}
|
|
8369
|
+
} else {
|
|
8370
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8371
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8360
8372
|
}
|
|
8361
8373
|
setIsSelectionToolActive(false);
|
|
8362
|
-
if (persistSelection && isFilterAction) {
|
|
8363
|
-
setPersistedSelectionPolygon(closedPoints);
|
|
8364
|
-
}
|
|
8365
8374
|
setSelectionPoints([]);
|
|
8366
8375
|
setSelectionHoverPoint(null);
|
|
8367
8376
|
}
|