@devexperts/dxcharts-lite
Version:
23 lines (22 loc) • 1.08 kB
TypeScript
/*
* Copyright (C) 2019 - 2026 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { ViewportModelState, Zoom } from './viewport.model';
export type ZoomXToZoomYRatio = number;
export declare const ratioFromZoomXY: (zoomX: Zoom, zoomY: Zoom) => ZoomXToZoomYRatio;
export declare const zoomXToZoomY: (zoomX: Zoom, ratio: ZoomXToZoomYRatio) => Zoom;
export declare const zoomYToZoomX: (zoomY: Zoom, ratio: ZoomXToZoomYRatio) => Zoom;
/**
* Locks the zoomY with zoomX and zooms y-scale depending on x-scale.
* @param prevState
* @param newState
*/
export declare const changeYToKeepRatio: (prevState: ViewportModelState, newState: ViewportModelState) => void;
/**
* Locks the zoomY with zoomX and zooms x-scale depending on y-scale.
* @param prevState
* @param newState
*/
export declare const changeXToKeepRatio: (prevState: ViewportModelState, newState: ViewportModelState) => void;