Skip to main content

computeEndStackMaxHeight

The tallest the end stack may be before it scrolls.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { computeEndStackMaxHeight } from "@mapcairn/core";

function computeEndStackMaxHeight(input: {
viewportHeight: number;
topOffset: number;
bottomReserved: number;
inset: number;
}): number;

Parameters​

  • input ({ viewportHeight: number; topOffset: number; bottomReserved: number; inset: number; }): The fields, by name:
    • topOffset: Distance from the top of the viewport to the stack's first control.
    • bottomReserved: Space below the stack that must stay clear, such as the bottom slots.
    • inset: Gap kept to the bottom edge.

Returns​

number

Source: packages/core/src/layout/layout.ts:137