@pbroom/color-kit/driverDrag controller
PointerDragController
Drag session handle returned by createPointerDragController.
import type { PointerDragController } from '@pbroom/color-kit/driver';drag-controller.ts:76interface PointerDragController<TInput> {
configure( config: Partial<PointerDragControllerConfig<TInput>>, ): void;
start( input: TInput, , coalescedCount?: number, ): void;
move( input: TInput, , coalescedCount?: number, ): void;
end(): void;
cancel(): void;
isActive(): boolean;
}Properties
- configure
(config: Partial<PointerDragControllerConfig<TInput>>) => voidmethod - Replaces callbacks/options; takes effect on the next frame or call.
- start
(input: TInput, coalescedCount?: number) => voidmethod - Begins a drag and force-commits the initial input.
coalescedCount(default 1) is the number of pointer samples this input represents. - move
(input: TInput, coalescedCount?: number) => voidmethod - Queues the latest input for the next frame, replacing any queued input. Ignored when inactive.
coalescedCountdefaults to 1. - end
() => voidmethod - Force-commits any pending input and ends the drag.
- cancel
() => voidmethod - Drops pending input and ends the drag without committing.
- isActive
() => booleanmethod - Whether a drag is in progress.