Skip to main content

clampHeight

Keeps a dragged height inside the peek and full extremes, with rubber-band resistance beyond them. Never returns a negative height.

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

Signature​

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

function clampHeight(height: number, heights: DetentHeights): number;

Parameters​

  • height (number)
  • heights (DetentHeights)

Returns​

number

See also​

Source: packages/core/src/sheet/sheet.ts:154