ag-charts-enterprise
Version:
Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue
42 lines (41 loc) • 1.36 kB
TypeScript
import { _ModuleSupport } from 'ag-charts-community';
import { type BoxBounds, ChartAxisDirection, type DynamicContext } from 'ag-charts-core';
type StateRetrieval = _ModuleSupport.CoreZoomStateSafeRetrieval;
export interface ZoomPanUpdate {
type: 'update';
deltaX: number;
deltaY: number;
}
declare const decelerationValues: {
off: number;
short: number;
long: number;
};
export declare class ZoomPanner {
private readonly ctx;
constructor(ctx: DynamicContext<_ModuleSupport.ChartRegistry>);
deceleration: number | keyof typeof decelerationValues;
private get decelerationValue();
private onUpdate;
private coords?;
private direction?;
private coordsMonitorTimeout;
private zoomCoordsHistoryIndex;
private readonly coordsHistory;
private inertiaHandle;
addListener(_type: 'update', fn: (e: ZoomPanUpdate) => void): () => void;
stopInteractions(): void;
update(event: {
currentX: number;
currentY: number;
}): void;
start(direction?: ChartAxisDirection): void;
stop(): void;
private recordCurrentZoomCoords;
private animateInertia;
private updateCoords;
private isPanningX;
private isPanningY;
translateZooms(bbox: BoxBounds, currentZooms: StateRetrieval, deltaX: number, deltaY: number): _ModuleSupport.CoreZoomState;
}
export {};