@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.cjs
CHANGED
|
@@ -8268,22 +8268,25 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
|
|
|
8268
8268
|
} catch (err) {
|
|
8269
8269
|
}
|
|
8270
8270
|
});
|
|
8271
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8272
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8273
8271
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8274
|
-
if (
|
|
8275
|
-
onSelectionComplete
|
|
8272
|
+
if (isFilterAction) {
|
|
8273
|
+
if (onSelectionComplete) {
|
|
8274
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8275
|
+
}
|
|
8276
|
+
if (persistSelection) {
|
|
8277
|
+
setPersistedSelectionPolygon([
|
|
8278
|
+
[minLng, maxLat],
|
|
8279
|
+
[maxLng, maxLat],
|
|
8280
|
+
[maxLng, minLat],
|
|
8281
|
+
[minLng, minLat],
|
|
8282
|
+
[minLng, maxLat]
|
|
8283
|
+
]);
|
|
8284
|
+
}
|
|
8285
|
+
} else {
|
|
8286
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8287
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8276
8288
|
}
|
|
8277
8289
|
setIsSelectionToolActive(false);
|
|
8278
|
-
if (persistSelection && isFilterAction) {
|
|
8279
|
-
setPersistedSelectionPolygon([
|
|
8280
|
-
[minLng, maxLat],
|
|
8281
|
-
[maxLng, maxLat],
|
|
8282
|
-
[maxLng, minLat],
|
|
8283
|
-
[minLng, minLat],
|
|
8284
|
-
[minLng, maxLat]
|
|
8285
|
-
]);
|
|
8286
|
-
}
|
|
8287
8290
|
startPoint = null;
|
|
8288
8291
|
setSelectionPoints([]);
|
|
8289
8292
|
} else if (selectionMode === "circle" && isDrawingSelection.current && startPoint) {
|
|
@@ -8318,16 +8321,19 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
|
|
|
8318
8321
|
} catch (err) {
|
|
8319
8322
|
}
|
|
8320
8323
|
});
|
|
8321
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8322
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8323
8324
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8324
|
-
if (
|
|
8325
|
-
onSelectionComplete
|
|
8325
|
+
if (isFilterAction) {
|
|
8326
|
+
if (onSelectionComplete) {
|
|
8327
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8328
|
+
}
|
|
8329
|
+
if (persistSelection) {
|
|
8330
|
+
setPersistedSelectionPolygon(selectionPolygon.geometry.coordinates[0]);
|
|
8331
|
+
}
|
|
8332
|
+
} else {
|
|
8333
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8334
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8326
8335
|
}
|
|
8327
8336
|
setIsSelectionToolActive(false);
|
|
8328
|
-
if (persistSelection && isFilterAction) {
|
|
8329
|
-
setPersistedSelectionPolygon(selectionPolygon.geometry.coordinates[0]);
|
|
8330
|
-
}
|
|
8331
8337
|
}
|
|
8332
8338
|
startPoint = null;
|
|
8333
8339
|
setSelectionPoints([]);
|
|
@@ -8373,16 +8379,19 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
|
|
|
8373
8379
|
} catch (err) {
|
|
8374
8380
|
}
|
|
8375
8381
|
});
|
|
8376
|
-
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8377
|
-
applySelectionState(finalIds, { focusProperties: true });
|
|
8378
8382
|
const isFilterAction = filterActiveRef.current || !showFilterTool;
|
|
8379
|
-
if (
|
|
8380
|
-
onSelectionComplete
|
|
8383
|
+
if (isFilterAction) {
|
|
8384
|
+
if (onSelectionComplete) {
|
|
8385
|
+
onSelectionComplete(selectionPolygon.geometry);
|
|
8386
|
+
}
|
|
8387
|
+
if (persistSelection) {
|
|
8388
|
+
setPersistedSelectionPolygon(closedPoints);
|
|
8389
|
+
}
|
|
8390
|
+
} else {
|
|
8391
|
+
const finalIds = e.shiftKey ? Array.from(/* @__PURE__ */ new Set([...selectedFeatureIdsRef.current, ...selectedIds])) : selectedIds;
|
|
8392
|
+
applySelectionState(finalIds, { focusProperties: true });
|
|
8381
8393
|
}
|
|
8382
8394
|
setIsSelectionToolActive(false);
|
|
8383
|
-
if (persistSelection && isFilterAction) {
|
|
8384
|
-
setPersistedSelectionPolygon(closedPoints);
|
|
8385
|
-
}
|
|
8386
8395
|
setSelectionPoints([]);
|
|
8387
8396
|
setSelectionHoverPoint(null);
|
|
8388
8397
|
}
|