computeBottomSlotLayout
Where the bottom slots sit relative to their resting place, which is
inset above the bottom edge and inset in from the side.
This is a function exported by @mapcairn/core, checked against version 0.2.0.
Signature
import { computeBottomSlotLayout } from "@mapcairn/core";
function computeBottomSlotLayout(input: {
layout: ChromeLayout | "none";
viewportWidth: number;
viewportHeight: number;
sheetTopEdge: number | null;
sheetDetent: SheetDetent | null;
panelRightEdge: number | null;
measureToolbarTop: number | null;
inset: number;
}): BottomSlotLayout;
Parameters
input({ layout: ChromeLayout | "none"; viewportWidth: number; viewportHeight: number; sheetTopEdge: number | null; sheetDetent: SheetDetent | null; panelRightEdge: number | null; measureToolbarTop: number | null; inset: number; }): The fields, by name:layout:"none"when no sheet or panel is shown (the measure toolbar may still be).sheetTopEdge: Distance from the top of the viewport to the sheet's top edge. Used only in the"sheet"layout.panelRightEdge: Distance from the left of the viewport to the panel's right edge. Used only in the"panel"layout.measureToolbarTop: Distance from the top of the viewport to the measure toolbar, when it is showing.
Returns
BottomSlotLayout
Remarks
Both bottom slots ride inset above the highest of the sheet's
top edge and the toolbar's top. A side panel moves only bottom-start,
sideways. The result never lifts further than the viewport is tall.