the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+104
@@ -0,0 +1,104 @@
|
||||
import { TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawMouseEvent, HexColorStyling, NumericStyling, Cursor, Snapping, DashArrayStyling } from "../../common";
|
||||
import { BaseModeOptions, CustomStyling, ModeUpdateOptions, TerraDrawBaseDrawMode } from "../base.mode";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
type TerraDrawPolyLineModeKeyEvents = {
|
||||
cancel: KeyboardEvent["key"] | null;
|
||||
finish: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type PolyLineStyling = {
|
||||
lineStringWidth: NumericStyling;
|
||||
lineStringColor: HexColorStyling;
|
||||
lineStringOpacity: NumericStyling;
|
||||
lineStringDash: DashArrayStyling;
|
||||
polygonFillColor: HexColorStyling;
|
||||
polygonFillOpacity: NumericStyling;
|
||||
polygonOutlineColor: HexColorStyling;
|
||||
polygonOutlineWidth: NumericStyling;
|
||||
polygonOutlineOpacity: NumericStyling;
|
||||
closingPointColor: HexColorStyling;
|
||||
closingPointWidth: NumericStyling;
|
||||
closingPointOpacity: NumericStyling;
|
||||
closingPointOutlineColor: HexColorStyling;
|
||||
closingPointOutlineWidth: NumericStyling;
|
||||
closingPointOutlineOpacity: NumericStyling;
|
||||
snappingPointColor: HexColorStyling;
|
||||
snappingPointWidth: NumericStyling;
|
||||
snappingPointOpacity: NumericStyling;
|
||||
snappingPointOutlineColor: HexColorStyling;
|
||||
snappingPointOutlineWidth: NumericStyling;
|
||||
snappingPointOutlineOpacity: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
close?: Cursor;
|
||||
}
|
||||
interface TerraDrawPolyLineModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
snapping?: Snapping;
|
||||
keyEvents?: TerraDrawPolyLineModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
showCoordinatePoints?: boolean;
|
||||
}
|
||||
export declare class TerraDrawPolyLineMode extends TerraDrawBaseDrawMode<PolyLineStyling> {
|
||||
mode: string;
|
||||
private currentCoordinate;
|
||||
private currentId;
|
||||
private keyEvents;
|
||||
private cursors;
|
||||
private mouseMove;
|
||||
private snapping;
|
||||
private snappedPointId;
|
||||
private showCoordinatePoints;
|
||||
private mutateFeature;
|
||||
private readFeature;
|
||||
private pixelDistance;
|
||||
private closingPoints;
|
||||
private clickBoundingBox;
|
||||
private lineSnapping;
|
||||
private coordinateSnapping;
|
||||
private featureSnapping;
|
||||
private degreeSnapping;
|
||||
private coordinatePoints;
|
||||
constructor(options?: TerraDrawPolyLineModeOptions<PolyLineStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawPolyLineModeOptions<PolyLineStyling>>): void;
|
||||
/** @internal */
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
private finishLine;
|
||||
private toPolygonLikeCoordinates;
|
||||
private closeAsPolygon;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
private onLeftClick;
|
||||
/** @internal */
|
||||
onClick(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onKeyUp(event: TerraDrawKeyboardEvent): void;
|
||||
/** @internal */
|
||||
onKeyDown(): void;
|
||||
/** @internal */
|
||||
onDragStart(): void;
|
||||
/** @internal */
|
||||
onDrag(): void;
|
||||
/** @internal */
|
||||
onDragEnd(): void;
|
||||
/** @internal */
|
||||
cleanUp(): void;
|
||||
private updateSnappedCoordinate;
|
||||
private snapCoordinate;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
afterFeatureAdded(feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
}
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in new issue
Block a user