Skip to main content

shouldShowZoomButtons

Decides whether to show the zoom buttons.

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

Signature​

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

function shouldShowZoomButtons(input: {
setting: boolean | null;
finePointer: boolean;
availableHeight: number;
minHeightForZoom: number;
}): ZoomButtonVisibility;

Parameters​

  • input ({ setting: boolean | null; finePointer: boolean; availableHeight: number; minHeightForZoom: number; }): The fields, by name:
    • setting: The user's setting. An explicit true always shows them (the stack scrolls instead of hiding them) and an explicit false never does. null uses the device default: shown for a fine pointer unless there is less than minHeightForZoom available.

Returns​

ZoomButtonVisibility

See also​

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