@mescius/dsimageviewer
Version:
Document Solutions Image Viewer
19 lines (18 loc) • 712 B
TypeScript
/**
* Global interaction state used to indicate when a property is actively being modified,
* such as during slider drag operations. Useful to defer expensive updates or re-renders
* until the interaction completes.
*/
export declare class InteractionState {
/**
* Indicates whether a property is actively being changed.
* Should be set to true on interaction start (e.g., slider drag start),
* and reset to false on interaction end (e.g., mouseup).
*/
static isEditing: boolean;
/**
* Utility method to perform an operation while setting isEditing=true,
* and ensuring it resets afterward.
*/
static runWhileEditing<T>(fn: () => T): T;
}