the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+93
@@ -0,0 +1,93 @@
|
||||
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
|
||||
import { TerraDrawBaseDrawMode, BaseModeOptions, CustomStyling, ModeUpdateOptions } from "../base.mode";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
type TerraDrawSensorModeKeyEvents = {
|
||||
cancel?: KeyboardEvent["key"] | null;
|
||||
finish?: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type SensorPolygonStyling = {
|
||||
centerPointColor: HexColorStyling;
|
||||
centerPointWidth: NumericStyling;
|
||||
centerPointOpacity: NumericStyling;
|
||||
centerPointOutlineColor: HexColorStyling;
|
||||
centerPointOutlineWidth: NumericStyling;
|
||||
centerPointOutlineOpacity: NumericStyling;
|
||||
outlineColor: HexColorStyling;
|
||||
outlineWidth: NumericStyling;
|
||||
outlineOpacity: NumericStyling;
|
||||
fillColor: HexColorStyling;
|
||||
fillOpacity: NumericStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
close?: Cursor;
|
||||
}
|
||||
interface TerraDrawSensorModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
arcPoints?: number;
|
||||
pointerDistance?: number;
|
||||
keyEvents?: TerraDrawSensorModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
showCoordinatePoints?: boolean;
|
||||
/** Allow reversing the arc by crossing back over its starting radius. Defaults to false. */
|
||||
allowDirectionChange?: boolean;
|
||||
}
|
||||
export declare class TerraDrawSensorMode extends TerraDrawBaseDrawMode<SensorPolygonStyling> {
|
||||
mode: string;
|
||||
private currentCoordinate;
|
||||
private currentId;
|
||||
private currentInitialArcId;
|
||||
private currentStartingPointId;
|
||||
private keyEvents;
|
||||
private direction;
|
||||
private arcPoints;
|
||||
private cursors;
|
||||
private mouseMove;
|
||||
private showCoordinatePoints;
|
||||
private allowDirectionChange;
|
||||
private previousEndBearing;
|
||||
private readFeature;
|
||||
private mutateFeature;
|
||||
private coordinatePoints;
|
||||
constructor(options?: TerraDrawSensorModeOptions<SensorPolygonStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawSensorModeOptions<SensorPolygonStyling>>): void;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
/** @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;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
private updateInitialArcCoordinatePoints;
|
||||
private deleteInitialArc;
|
||||
private close;
|
||||
private getUpdatedPolygonCoordinates;
|
||||
private getUpdatedLineStringCoordinates;
|
||||
private getDeltaBearing;
|
||||
private notInSector;
|
||||
}
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in new issue
Block a user