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">

29 lines (28 loc) 1.54 kB
import { Boundaries } from "../../board-camera/utils/position"; import { ZoomLevelLimits } from "../../board-camera/utils/zoom"; /** * @description Calculates the minimum zoom level based on the dimensions of the boundaries. * Used when the canvas on the html is resized. * * @category Camera */ export declare function minZoomLevelBaseOnDimensions(boundaries: Boundaries | undefined, canvasWidth: number, canvasHeight: number, cameraRotation: number): number | undefined; /** * @description Determines if the zoom level boundaries should be updated when the canvas is resized. * Zoom level boundaries adjustment only tightens the zoom level boundaries; it does not relax them. * * @category Camera */ export declare function zoomLevelBoundariesShouldUpdate(zoomLevelBoundaries: ZoomLevelLimits | undefined, targetMinZoomLevel: number | undefined): boolean; /** * @description Calculates the minimum zoom level based on the width of the boundaries. * Used when the canvas on the html is resized. * @category Camera */ export declare function minZoomLevelBaseOnWidth(boundaries: Boundaries | undefined, canvasWidth: number, canvasHeight: number, cameraRotation: number): number | undefined; /** * @description Calculates the minimum zoom level based on the height of the boundaries. * Used when the canvas on the html is resized. * @category Camera */ export declare function minZoomLevelBaseOnHeight(boundaries: Boundaries | undefined, canvasWidth: number, canvasHeight: number, cameraRotation: number): number | undefined;