ENGLISH·COURSE API
    Preparing search index...

    The measurements centeredScrollTop needs, all in CSS pixels.

    Plain numbers rather than DOM nodes on purpose: jsdom reports 0 for every layout box, so geometry expressed against live elements cannot be unit tested. The caller does the measuring; this module does the arithmetic.

    type CenteredScrollTopMeasurements = {
        rowOffsetTop: number;
        rowHeight: number;
        regionHeight: number;
        maxScrollTop: number;
    }
    Index

    Properties

    rowOffsetTop: number

    The row's top edge, relative to the origin of the region's scrollable content.

    rowHeight: number

    The row's own height.

    regionHeight: number

    The height of the region's visible area (its clientHeight).

    maxScrollTop: number

    The furthest the region can scroll (scrollHeight - clientHeight).