supervision-js
    Preparing search index...

    Interface AnnotationEditingEngineOptions

    interface AnnotationEditingEngineOptions {
        rotationHandle?:
            | AnnotationRotationHandleOptions
            | ((detection: Detection) => AnnotationRotationHandleOptions);
        resolveRotation?: (
            radians: number,
            context: AnnotationRotationContext,
        ) => number;
        viewportScale?: () => number;
        onStateChange?: (state: AnnotationEditingState) => void;
        onPreview?: (preview: Detection | null) => void;
        onCommit?: (detection: Detection, previous: Detection | null) => void;
        onCancel?: () => void;
        onFastTranslate?: (id: string | number, dx: number, dy: number) => void;
        capturePointer?: (pointerId: number) => void;
        releasePointer?: (pointerId: number) => void;
    }

    Hierarchy (View Summary)

    Index
    rotationHandle?:
        | AnnotationRotationHandleOptions
        | ((detection: Detection) => AnnotationRotationHandleOptions)
    resolveRotation?: (
        radians: number,
        context: AnnotationRotationContext,
    ) => number

    Constrain an absolute clockwise rotation candidate in radians. Called once per preview or commit from original geometry, never from a prior preview. Return finite radians; the engine normalizes the result to [-PI, PI].

    viewportScale?: () => number
    onStateChange?: (state: AnnotationEditingState) => void
    onPreview?: (preview: Detection | null) => void
    onCommit?: (detection: Detection, previous: Detection | null) => void

    Runs before terminal idle subscribers; getState() already reflects completion.

    onCancel?: () => void

    Whole-edit cancellation; a contact interruption that retains a draft does not call this.

    onFastTranslate?: (id: string | number, dx: number, dy: number) => void
    capturePointer?: (pointerId: number) => void
    releasePointer?: (pointerId: number) => void