platform-bible-utils
    Preparing search index...

    Function getPaneSizeLimits

    • Calculates the minimum and maximum size (as percentages) for a resizable pane in a two-pane layout based on the total available height or width and optional constraints.

      The returned percentages indicate the allowable range for the secondary pane (the one whose size limits are being computed). When applied, they ensure that pane never shrinks below its minimum or grows beyond its maximum, leaving adequate space for both panes.

      Parameters

      • availablePx: number

        Total height or width available for both panes, in pixels.

      • options: PaneSizeLimitsOptions = {}

        Optional parameters for customizing pane size constraints.

      Returns { maxPercent: number; minPercent: number }

      An object containing the minimum and maximum percentages the secondary pane can occupy: { minPercent, maxPercent }.