-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.d.ts
More file actions
57 lines (54 loc) · 1.86 KB
/
index.d.ts
File metadata and controls
57 lines (54 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import {
Layer,
LayerEventHandlerFn,
LeafletEventHandlerFn,
VertexEventHandlerFn,
CancelableEventHandlerFn,
ShapeEventHandlerFn,
Editable,
} from "leaflet";
export interface LeafletEditableEventHandlers {
onCreated?: LayerEventHandlerFn;
onEnable?: LeafletEventHandlerFn;
onDisable?: LeafletEventHandlerFn;
onEditing?: LeafletEventHandlerFn;
onDragStart?: LeafletEventHandlerFn;
onDrag?: LeafletEventHandlerFn;
onDragEnd?: LeafletEventHandlerFn;
onDrawingStart?: LeafletEventHandlerFn;
onDrawingEnd?: LeafletEventHandlerFn;
onDrawingCancel?: LeafletEventHandlerFn;
onDrawingCommit?: LeafletEventHandlerFn;
onDrawingMousedown?: LeafletEventHandlerFn;
onDrawingMouseup?: LeafletEventHandlerFn;
onDrawingClick?: CancelableEventHandlerFn;
onDrawingMove?: LeafletEventHandlerFn;
onDrawingClicked?: LeafletEventHandlerFn;
onVertexNew?: VertexEventHandlerFn;
onVertexClick?: CancelableEventHandlerFn;
onVertexClicked?: VertexEventHandlerFn;
onVertexRawclick?: CancelableEventHandlerFn;
onVertexDeleted?: VertexEventHandlerFn;
onVertexCtrlclick?: VertexEventHandlerFn;
onVertexShiftclick?: VertexEventHandlerFn;
onVertexMetakeyclick?: VertexEventHandlerFn;
onVertexAltclick?: VertexEventHandlerFn;
onVertexContextmenu?: VertexEventHandlerFn;
onVertexMousedown?: VertexEventHandlerFn;
onVertexDrag?: VertexEventHandlerFn;
onVertexDragstart?: VertexEventHandlerFn;
onVertexDragend?: VertexEventHandlerFn;
onMiddlemarkerMousedown?: VertexEventHandlerFn;
onShapeNew?: ShapeEventHandlerFn;
onShapeDelete?: CancelableEventHandlerFn;
onShapeDeleted?: ShapeEventHandlerFn;
}
export interface UseLeafletEditableOptions {
events: LeafletEditableEventHandlers;
}
export function useLeafletEditable(
options: UseLeafletEditableOptions,
): Editable & {
enableEdit: (feature: Layer) => void;
disableEdit: (feature: Layer) => void;
};