terra-draw 1.10.0 → 1.11.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.
@@ -0,0 +1,62 @@
1
+ import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
2
+ import { BaseModeOptions, CustomStyling, TerraDrawBaseDrawMode } from "../base.mode";
3
+ import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
4
+ type TerraDrawFreehandLineStringModeKeyEvents = {
5
+ cancel: KeyboardEvent["key"] | null;
6
+ finish: KeyboardEvent["key"] | null;
7
+ };
8
+ type FreehandLineStringStyling = {
9
+ lineStringWidth: NumericStyling;
10
+ lineStringColor: HexColorStyling;
11
+ closingPointColor: HexColorStyling;
12
+ closingPointWidth: NumericStyling;
13
+ closingPointOutlineColor: HexColorStyling;
14
+ closingPointOutlineWidth: NumericStyling;
15
+ };
16
+ interface Cursors {
17
+ start?: Cursor;
18
+ close?: Cursor;
19
+ }
20
+ interface TerraDrawFreehandLineStringModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
21
+ minDistance?: number;
22
+ keyEvents?: TerraDrawFreehandLineStringModeKeyEvents | null;
23
+ cursors?: Cursors;
24
+ }
25
+ export declare class TerraDrawFreehandLineStringMode extends TerraDrawBaseDrawMode<FreehandLineStringStyling> {
26
+ mode: "freehand-linestring";
27
+ private startingClick;
28
+ private currentId;
29
+ private closingPointId;
30
+ private minDistance;
31
+ private keyEvents;
32
+ private cursors;
33
+ private preventNewFeature;
34
+ constructor(options?: TerraDrawFreehandLineStringModeOptions<FreehandLineStringStyling>);
35
+ updateOptions(options?: TerraDrawFreehandLineStringModeOptions<FreehandLineStringStyling> | undefined): void;
36
+ private close;
37
+ /** @internal */
38
+ start(): void;
39
+ /** @internal */
40
+ stop(): void;
41
+ /** @internal */
42
+ onMouseMove(event: TerraDrawMouseEvent): void;
43
+ /** @internal */
44
+ onClick(event: TerraDrawMouseEvent): void;
45
+ /** @internal */
46
+ onKeyDown(): void;
47
+ /** @internal */
48
+ onKeyUp(event: TerraDrawKeyboardEvent): void;
49
+ /** @internal */
50
+ onDragStart(): void;
51
+ /** @internal */
52
+ onDrag(): void;
53
+ /** @internal */
54
+ onDragEnd(): void;
55
+ /** @internal */
56
+ cleanUp(): void;
57
+ /** @internal */
58
+ styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
59
+ validateFeature(feature: unknown): StoreValidation;
60
+ afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
61
+ }
62
+ export {};