Rezi
    Preparing search index...

    Function clampScrollTop

    • Clamp scrollTop to valid range.

      Parameters

      • scrollTop: number

        Proposed scroll position

      • totalHeight: number

        Total content height

      • viewportHeight: number

        Visible viewport height

      Returns number

      Clamped scrollTop in range [0, max(0, totalHeight - viewportHeight)]