weasel API - v0.8.0
    Preparing search index...

    Interface GuideSnapOptions<TPose>

    Options for guideSnapStrategy.

    interface GuideSnapOptions<TPose> {
        getView?: () => View;
        origin?: OriginProjection<TPose>;
        tolerance?: number;
    }

    Type Parameters

    • TPose
    Index

    Properties

    getView?: () => View

    Read the active view transform. When supplied, tolerance is interpreted in screen pixels and divided by view.scale so the trigger zone stays the same on screen as the user zooms in/out. Without it, tolerance is treated as world units.

    Projection used when TPose doesn't expose {x, y} directly (Path, polygon, etc.) — same contract as gridSnapStrategy. Defaults to the rect-pose identity projection.

    tolerance?: number

    Tolerance, in screen pixels (CSS px) when getView is provided, or in world units otherwise. Defaults to DEFAULT_GUIDE_TOLERANCE_PX.