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

+33
View File
@@ -0,0 +1,33 @@
type UndoRedoHistoryEntry<Coordinates> = {
featureCoordinates: Coordinates;
currentCoordinate: number;
};
type UndoStepResult<Coordinates> = {
undoneEntry: UndoRedoHistoryEntry<Coordinates>;
previousEntry: UndoRedoHistoryEntry<Coordinates> | undefined;
};
type UndoRedoBehaviorOptions = {
maxStackSize?: number;
};
export declare class UndoRedoBehavior<Coordinates> {
private undoHistory;
private redoHistory;
private cloneCoordinatesFunction;
private maxStackSize;
constructor(options?: UndoRedoBehaviorOptions);
setMaxStackSize(maxStackSize: number): void;
private trimHistoryToMax;
private pushUndoEntry;
private pushRedoEntry;
private cloneRecursively;
cloneCoordinates(coordinates: Coordinates): Coordinates;
private cloneEntry;
clear(): void;
undoSize(): number;
redoSize(): number;
recordSnapshot(entry: UndoRedoHistoryEntry<Coordinates>): void;
beginUndo(): UndoStepResult<Coordinates> | undefined;
takeRedo(): UndoRedoHistoryEntry<Coordinates> | undefined;
commitRedo(entry: UndoRedoHistoryEntry<Coordinates>): void;
}
export {};