Skip to content

1681-engine / ui / clampScroll

Function: clampScroll() ​

ts
function clampScroll(
   offset, 
   content, 
   viewport
): number;

Defined in: src/ui/layout/scroll.ts:9

A scroll offset kept between the top and the last full window of content.

Parameters ​

ParameterType
offsetnumber
contentnumber
viewportnumber

Returns ​

number

Released under the MIT License.