@florasync/leaflet-geokit 0.4.0 → 0.5.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/CHANGELOG.md +32 -8
- package/README.md +32 -14
- package/dist/django/index.js +2504 -2069
- package/dist/django/index.js.map +1 -1
- package/dist/leaflet-geokit.es.js +2489 -2054
- package/dist/leaflet-geokit.es.js.map +1 -1
- package/dist/leaflet-geokit.external.es.js +1029 -594
- package/dist/leaflet-geokit.external.es.js.map +1 -1
- package/dist/leaflet-geokit.umd.js +48 -15
- package/dist/leaflet-geokit.umd.js.map +1 -1
- package/dist/preact/{index-BM2U4rKn.js → index-D8EjMf-1.js} +1047 -612
- package/dist/preact/index-D8EjMf-1.js.map +1 -0
- package/dist/preact/index.js +1 -1
- package/dist/preact-bundled/index.js +2432 -1997
- package/dist/preact-bundled/index.js.map +1 -1
- package/dist/react/{index-BM2U4rKn.js → index-D8EjMf-1.js} +1047 -612
- package/dist/react/index-D8EjMf-1.js.map +1 -0
- package/dist/react/index.js +1 -1
- package/dist/react-bundled/index.js +2431 -1996
- package/dist/react-bundled/index.js.map +1 -1
- package/dist/types/src/lib/MapController.d.ts +5 -0
- package/dist/types/src/lib/draw/L.Draw.Move.d.ts +49 -0
- package/dist/types/src/types/public.d.ts +2 -0
- package/dist/types/tests/draw-move.spec.d.ts +1 -0
- package/dist/types/tests/ensure-element.spec.d.ts +1 -0
- package/dist/types/tests/external-entry.spec.d.ts +1 -0
- package/dist/types/tests/leaflet-guards.spec.d.ts +1 -0
- package/dist/types/tests/preact-shim.spec.d.ts +1 -0
- package/package.json +3 -1
- package/dist/preact/index-BM2U4rKn.js.map +0 -1
- package/dist/react/index-BM2U4rKn.js.map +0 -1
|
@@ -61,6 +61,8 @@ export declare class MapController {
|
|
|
61
61
|
private vertexMenuEl;
|
|
62
62
|
private vertexMenuCleanup;
|
|
63
63
|
private activeCakeSession;
|
|
64
|
+
private moveConfirmationUI;
|
|
65
|
+
private activeMoveHandler;
|
|
64
66
|
constructor(opts: MapControllerOptions);
|
|
65
67
|
private resolveLeaflet;
|
|
66
68
|
init(): Promise<void>;
|
|
@@ -88,6 +90,7 @@ export declare class MapController {
|
|
|
88
90
|
setRulerUnits(system: MeasurementSystem): void;
|
|
89
91
|
private buildDrawOptions;
|
|
90
92
|
private applyLayerCakeToolbarIcon;
|
|
93
|
+
private applyMoveToolbarIcon;
|
|
91
94
|
private addRulerControl;
|
|
92
95
|
private installRulerPrecisionPatch;
|
|
93
96
|
private rebuildRulerControl;
|
|
@@ -113,4 +116,6 @@ export declare class MapController {
|
|
|
113
116
|
private showVertexMenu;
|
|
114
117
|
private findNearestVertex;
|
|
115
118
|
private deleteVertex;
|
|
119
|
+
private showMoveConfirmationUI;
|
|
120
|
+
private hideMoveConfirmationUI;
|
|
116
121
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as L from "leaflet";
|
|
2
|
+
declare const DrawMove_base: any;
|
|
3
|
+
/**
|
|
4
|
+
* DrawMove: A custom Leaflet.draw handler that enables moving/translating existing features.
|
|
5
|
+
* This handler activates a "move mode" where users can click and drag features to new positions.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DrawMove extends DrawMove_base {
|
|
8
|
+
static TYPE: string;
|
|
9
|
+
private _featureGroup;
|
|
10
|
+
private _selectedLayer;
|
|
11
|
+
private _originalLatLngs;
|
|
12
|
+
private _dragStartLatLng;
|
|
13
|
+
private _isDragging;
|
|
14
|
+
private _pendingMove;
|
|
15
|
+
constructor(map: L.Map, options?: {
|
|
16
|
+
featureGroup: L.FeatureGroup;
|
|
17
|
+
} & any);
|
|
18
|
+
enable(): void;
|
|
19
|
+
disable(): void;
|
|
20
|
+
addHooks(): void;
|
|
21
|
+
removeHooks(): void;
|
|
22
|
+
private _enableLayerHover;
|
|
23
|
+
private _disableLayerHover;
|
|
24
|
+
private _onLayerMouseOver;
|
|
25
|
+
private _onLayerMouseOut;
|
|
26
|
+
private _onLayerMouseDown;
|
|
27
|
+
private _storeOriginalLatLngs;
|
|
28
|
+
private _onMouseMove;
|
|
29
|
+
private _offsetLatLngs;
|
|
30
|
+
private _onMouseUp;
|
|
31
|
+
private _cleanupDragging;
|
|
32
|
+
/**
|
|
33
|
+
* Confirm the pending move and dispatch the final event.
|
|
34
|
+
*/
|
|
35
|
+
confirmMove(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Cancel the pending move and revert the layer to its original position.
|
|
38
|
+
*/
|
|
39
|
+
cancelMove(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Check if there's a pending move awaiting confirmation.
|
|
42
|
+
*/
|
|
43
|
+
hasPendingMove(): boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Ensure DrawMove is registered with a given Leaflet namespace.
|
|
47
|
+
*/
|
|
48
|
+
export declare function ensureDrawMoveRegistered(Lns: typeof L): void;
|
|
49
|
+
export {};
|
|
@@ -42,6 +42,8 @@ export interface DrawControlsConfig {
|
|
|
42
42
|
/** Draw a Layer Cake base circle + manager to create concentric donut polygons. */
|
|
43
43
|
cake?: boolean;
|
|
44
44
|
marker?: boolean;
|
|
45
|
+
/** Move/translate existing features. */
|
|
46
|
+
move?: boolean;
|
|
45
47
|
edit?: boolean;
|
|
46
48
|
delete?: boolean;
|
|
47
49
|
ruler?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@src/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@src/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@florasync/leaflet-geokit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Framework-agnostic Leaflet + Leaflet.draw web component with TypeScript, verbose logging, and tests.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/leaflet-geokit.umd.js",
|
|
@@ -80,6 +80,8 @@
|
|
|
80
80
|
"test:e2e": "playwright test",
|
|
81
81
|
"e2e:install": "playwright install --with-deps",
|
|
82
82
|
"prepare": "husky",
|
|
83
|
+
"spec-kitty:init": "spec-kitty init . --ai claude",
|
|
84
|
+
"spec-kitty:doctor": "spec-kitty doctor",
|
|
83
85
|
"prepack": "npm run build",
|
|
84
86
|
"pack:dry": "npm pack --dry-run",
|
|
85
87
|
"release:dry": "npm run typecheck && npm run test:unit && npm run build && npm pack --dry-run"
|