@pbroom/color-kit/driverDrag controller

PointerDragController

Drag session handle returned by createPointerDragController.

interfaceimport type { PointerDragController } from '@pbroom/color-kit/driver';drag-controller.ts:76
interface 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. coalescedCount defaults 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.