UNPKG

@ue-too/board

Version:
29 lines (28 loc) 1.52 kB
import { Boundaries } from "../camera/utils/position"; import { ZoomLevelLimits } from "../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;