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

    Interface AnimateToBoundsOptions

    Options accepted by useViewAnimation's animateToBounds.

    interface AnimateToBoundsOptions {
        duration?: number;
        easing?: (t: number) => number;
        maxScale?: number;
        minScale?: number;
        mode?: "fill" | "contain" | "stretch";
        padding?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    duration?: number

    Tween duration in ms (forwarded to animateTo).

    easing?: (t: number) => number

    Tween easing (forwarded to animateTo).

    maxScale?: number

    Override the kit's system max scale. Defaults to the kit-wide max zoom used by computeWheelAction / useZoom (currently 10).

    minScale?: number

    Override the kit's system min scale. Defaults to the kit-wide min zoom used by computeWheelAction / useZoom (currently 0.1).

    mode?: "fill" | "contain" | "stretch"

    Fit mode:

    • 'contain' (default): uniform scale = min(availW/w, availH/h). Bounds fit entirely; one axis has letterboxing.
    • 'fill': uniform scale = max(...). Bounds overflow viewport on one axis.
    • 'stretch': per-axis scale. Bounds match viewport exactly; scale is non-uniform.
    padding?: number

    Inset (in CSS px) around the bounds. Default 16.