UNPKG

@niuee/board

Version:

<h1 align="center"> board </h1> <p align="center"> board supercharges your html canvas element giving it the capabilities to pan, zoom, rotate, and much more. </p> <p align="center"> <a href="https://www.npmjs.com/package/@niuee/board">

26 lines (25 loc) 712 B
/** * @description The limits of the zoom level. * * @category Camera */ export type ZoomLevelLimits = { min?: number; max?: number; }; /** * @description Checks if the zoom level limits are valid. */ export declare function isValidZoomLevelLimits(zoomLevelLimits: ZoomLevelLimits | undefined): boolean; /** * @description Clamps the zoom level within the limits. * * @category Camera */ export declare function clampZoomLevel(zoomLevel: number, zoomLevelLimits?: ZoomLevelLimits): number; /** * @description Checks if the zoom level is within the limits. * * @category Camera */ export declare function zoomLevelWithinLimits(zoomLevel: number, zoomLevelLimits?: ZoomLevelLimits): boolean;