SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface ViewportStore

    Read-only view of the scroll store. Layers/panes read the current scroll here and subscribe for changes.

    interface ViewportStore {
        getClient(): Size;
        getMetrics(): ViewportMetrics;
        getScroll(): TopLeft;
        getSnapshot(): TopLeft;
        getTarget(): TopLeft;
        getZoom(): number;
        isReady(): boolean;
        isSettled(): boolean;
        subscribe(listener: () => void): () => void;
    }

    Hierarchy (View Summary)

    Index
    • The raw cell-area client size = the measured client (uncapped by content). The grid reads this for its own pane layout (min(client, content)); getMetrics caps it at content.

      Returns Size

    • The combined viewport (position + measured sizes) as one identity-stable object — what a subscribed ScrollPane reads to size and place its scrollbars.

      Returns ViewportMetrics

    • Convenience { left, top } of the current (rendered) scroll.

      Returns TopLeft

    • The current (rendered) scroll snapshot. The returned object is identity-stable until the scroll changes, so it is safe as a useSyncExternalStore snapshot.

      Returns TopLeft

    • The scroll TARGET the ticker is easing toward (equals current when settled).

      Returns TopLeft

    • The zoom factor (1 = none). Part of the viewport shape so a shared/synced viewport carries it.

      Returns number

    • Whether the viewport has everything it needs to clamp + emit: a measured client (observer fired or manual sizes pushed) AND real content AND a positive client. The shared readiness signal that replaces each grid's "pending until ready" gate.

      Returns boolean

    • Whether the current (rendered) position has reached the target — no easing in progress.

      Returns boolean

    • Subscribe to scroll changes. Driven by the rAF ticker, so the listener fires at most once per animation frame (and only while current is advancing toward target). Returns a remover.

      Parameters

      • listener: () => void

      Returns () => void