UNPKG

terra-draw

Version:

Frictionless map drawing across mapping provider

27 lines (26 loc) 1.52 kB
import { TerraDrawMouseEvent } from "../../../common"; import { BehaviorConfig, TerraDrawModeBehavior } from "../../base.behavior"; import { FeatureAtPointerEventBehavior } from "./feature-at-pointer-event.behavior"; import { SelectionPointBehavior } from "./selection-point.behavior"; import { MidPointBehavior } from "./midpoint.behavior"; import { FeatureId } from "../../../store/store"; import { CoordinatePointBehavior } from "./coordinate-point.behavior"; import { ReadFeatureBehavior } from "../../read-feature.behavior"; import { MutateFeatureBehavior } from "../../mutate-feature.behavior"; export declare class DragFeatureBehavior extends TerraDrawModeBehavior { readonly config: BehaviorConfig; private readonly featuresAtCursorEvent; private readonly selectionPoints; private readonly midPoints; private readonly coordinatePoints; private readonly readFeature; private readonly mutateFeature; constructor(config: BehaviorConfig, featuresAtCursorEvent: FeatureAtPointerEventBehavior, selectionPoints: SelectionPointBehavior, midPoints: MidPointBehavior, coordinatePoints: CoordinatePointBehavior, readFeature: ReadFeatureBehavior, mutateFeature: MutateFeatureBehavior); private draggedFeatureId; private dragPosition; startDragging(event: TerraDrawMouseEvent, id: FeatureId): void; stopDragging(): void; isDragging(): boolean; canDrag(event: TerraDrawMouseEvent, selectedId: FeatureId): boolean; drag(event: TerraDrawMouseEvent): false | undefined; }