terra-draw 1.24.0 → 1.24.2
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/modes/select/behaviors/drag-coordinate.behavior.d.ts +5 -0
- package/dist/modes/select/behaviors/feature-at-pointer-event.behavior.d.ts +0 -1
- package/dist/modes/select/behaviors/midpoint.behavior.d.ts +5 -1
- package/dist/modes/select/select.mode.d.ts +3 -0
- package/dist/terra-draw.cjs +1 -1
- package/dist/terra-draw.cjs.map +1 -1
- package/dist/terra-draw.modern.js +1 -1
- package/dist/terra-draw.modern.js.map +1 -1
- package/dist/terra-draw.module.js +1 -1
- package/dist/terra-draw.module.js.map +1 -1
- package/dist/terra-draw.umd.js +1 -1
- package/dist/terra-draw.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,11 @@ export declare class DragCoordinateBehavior extends TerraDrawModeBehavior {
|
|
|
22
22
|
constructor(config: BehaviorConfig, pixelDistance: PixelDistanceBehavior, selectionPoints: SelectionPointBehavior, midPoints: MidPointBehavior, coordinatePoints: CoordinatePointBehavior, coordinateSnapping: CoordinateSnappingBehavior, lineSnapping: LineSnappingBehavior, readFeature: ReadFeatureBehavior, mutateFeature: MutateFeatureBehavior);
|
|
23
23
|
private draggedCoordinate;
|
|
24
24
|
private getClosestCoordinate;
|
|
25
|
+
getDraggable(event: TerraDrawMouseEvent, selectedId: FeatureId): {
|
|
26
|
+
dist: number;
|
|
27
|
+
index: number;
|
|
28
|
+
isFirstOrLastPolygonCoord: boolean;
|
|
29
|
+
};
|
|
25
30
|
getDraggableIndex(event: TerraDrawMouseEvent, selectedId: FeatureId): number;
|
|
26
31
|
private snapCoordinate;
|
|
27
32
|
drag(event: TerraDrawMouseEvent, allowSelfIntersection: boolean, snapping: Snapping): boolean;
|
|
@@ -10,6 +10,5 @@ export declare class FeatureAtPointerEventBehavior extends TerraDrawModeBehavior
|
|
|
10
10
|
constructor(config: BehaviorConfig, createClickBoundingBox: ClickBoundingBoxBehavior, pixelDistance: PixelDistanceBehavior);
|
|
11
11
|
find(event: TerraDrawMouseEvent, hasSelection: boolean): {
|
|
12
12
|
clickedFeature: GeoJSONStoreFeatures | undefined;
|
|
13
|
-
clickedMidPoint: GeoJSONStoreFeatures | undefined;
|
|
14
13
|
};
|
|
15
14
|
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { Position } from "geojson";
|
|
2
2
|
import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior";
|
|
3
3
|
import { SelectionPointBehavior } from "./selection-point.behavior";
|
|
4
|
+
import { TerraDrawMouseEvent } from "../../../common";
|
|
4
5
|
import { FeatureId } from "../../../store/store";
|
|
5
6
|
import { CoordinatePointBehavior } from "./coordinate-point.behavior";
|
|
6
7
|
import { MutateFeatureBehavior } from "../../mutate-feature.behavior";
|
|
7
8
|
import { ReadFeatureBehavior } from "../../read-feature.behavior";
|
|
9
|
+
import { PixelDistanceBehavior } from "../../pixel-distance.behavior";
|
|
8
10
|
export declare class MidPointBehavior extends TerraDrawModeBehavior {
|
|
9
11
|
readonly config: BehaviorConfig;
|
|
10
12
|
private readonly selectionPointBehavior;
|
|
11
13
|
private readonly coordinatePointBehavior;
|
|
12
14
|
private readonly mutateFeature;
|
|
13
15
|
private readonly readFeature;
|
|
14
|
-
|
|
16
|
+
private readonly pixelDistance;
|
|
17
|
+
constructor(config: BehaviorConfig, selectionPointBehavior: SelectionPointBehavior, coordinatePointBehavior: CoordinatePointBehavior, mutateFeature: MutateFeatureBehavior, readFeature: ReadFeatureBehavior, pixelDistance: PixelDistanceBehavior);
|
|
15
18
|
private _midPoints;
|
|
16
19
|
private getMidpointConfig;
|
|
17
20
|
get ids(): FeatureId[];
|
|
18
21
|
set ids(_: FeatureId[]);
|
|
22
|
+
getNearestMidPoint(event: TerraDrawMouseEvent): undefined;
|
|
19
23
|
insert({ featureId, midPointId, }: {
|
|
20
24
|
featureId: FeatureId;
|
|
21
25
|
midPointId: FeatureId;
|
|
@@ -84,6 +84,7 @@ export declare class TerraDrawSelectMode extends TerraDrawBaseSelectMode<Selecti
|
|
|
84
84
|
private keyEvents;
|
|
85
85
|
private cursors;
|
|
86
86
|
private validations;
|
|
87
|
+
private dragTarget;
|
|
87
88
|
private selectionPoints;
|
|
88
89
|
private midPoints;
|
|
89
90
|
private coordinateSnap;
|
|
@@ -107,6 +108,8 @@ export declare class TerraDrawSelectMode extends TerraDrawBaseSelectMode<Selecti
|
|
|
107
108
|
deselectFeature(): void;
|
|
108
109
|
private deselect;
|
|
109
110
|
private deleteSelected;
|
|
111
|
+
private clearDragTargetAndCursor;
|
|
112
|
+
private getSelectedFlags;
|
|
110
113
|
private onRightClick;
|
|
111
114
|
private select;
|
|
112
115
|
private onLeftClick;
|