ChromeLayoutValue
What MapChrome tells the surfaces and slots inside it.
This is an interface exported by @mapcairn/map, checked against version 0.2.0.
Signature
import type { ChromeLayoutValue } from "@mapcairn/map";
interface ChromeLayoutValue
Properties
finePointer
readonly finePointer: boolean;
The primary input is a fine pointer, so zoom buttons and keyboard help make sense by default.
layout
readonly layout: ChromeLayout;
Bottom sheet on narrow, tall screens; side panel from 768px wide or under 500px tall.
mapKeyClearance
readonly mapKeyClearance?: number | null;
Distance from the map's bottom edge to the top of the visible map key. Null while the key is absent or has given way.
panelEdge
readonly panelEdge: number | null;
The distance from inline-start to the open panel's far edge, in px. Null in the sheet layout or before measurement.
viewport
readonly viewport: {
readonly width: number;
readonly height: number;
};
The size of the chrome container, in CSS pixels.
Methods
publishSheetTop
publishSheetTop(px: number | null): void;
The sheet publishes its current top edge (px from the top of the chrome container) so the bottom slots can ride above it. Pass null when closed.
px(number | null)