the editable site (validation-lab)

This commit is contained in:
kpgarrod committed 2026-11-21 08:03:55 +01:00
commit 3ac81d5a52
13454 files changed
+2227005

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
import { Project, Unproject, SetCursor, GetLngLatFromEvent, TerraDrawChanges, TerraDrawStylingFunction, TerraDrawAdapterStyling } from "../common";
import { TerraDrawBaseAdapter, CustomStyling, TerraDrawBaseDrawMode } from "../extend";
import { TerraDrawExtend, GeoJSONStoreFeatures, BehaviorConfig } from "../terra-draw";
/**
* A mock implementation of a custom adapter - this is to ensure that it is possible to write
* custom adapters for Terra Draw exclusively relying on the public API of the library.
*/
export declare class TerraDrawTestAdapter extends TerraDrawBaseAdapter {
constructor(config: {
lib: Record<string, unknown>;
} & TerraDrawExtend.BaseAdapterConfig);
getMapEventElement(): HTMLElement;
clear(): void;
project(lng: number, lat: number): ReturnType<Project>;
unproject(x: number, y: number): ReturnType<Unproject>;
setCursor(_: TerraDrawExtend.Cursor): ReturnType<SetCursor>;
getLngLatFromEvent(_: PointerEvent | MouseEvent): ReturnType<GetLngLatFromEvent>;
setDraggability(_: boolean): void;
setDoubleClickToZoom(_: boolean): void;
render(_1: TerraDrawChanges, _2: TerraDrawStylingFunction): void;
register(callbacks: TerraDrawExtend.TerraDrawCallbacks): void;
unregister(): void;
}
/**
* A mock implementation for a custom draw mode - this is to ensure that it is possible to write
* custom draw modes for Terra Draw exclusively relying on the public API of the library.
*/
interface TerraDrawTestModeOptions<T extends CustomStyling> extends TerraDrawExtend.BaseModeOptions<T> {
customProperty: string;
}
interface TestModeStyling extends CustomStyling {
fillColor: TerraDrawExtend.HexColorStyling;
outlineWidth: TerraDrawExtend.NumericStyling;
}
export declare class TerraDrawTestMode extends TerraDrawBaseDrawMode<TestModeStyling> {
private customProperty;
constructor(options?: TerraDrawTestModeOptions<TestModeStyling>);
styleFeature(_: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
registerBehaviors(_: BehaviorConfig): void;
start(): void;
stop(): void;
cleanUp(): void;
}
export {};