import { Component } from '@antv/f-engine'; import { ChartChildProps } from '../../chart'; import { Scale } from '../../deps/f2-scale/src'; export type ZoomRange = [number, number]; export type ScaleValues = number[] | string[]; export interface ZoomProps { panSensitive?: number; pinchSensitive?: number; /** * 缩放和平移模式 */ mode?: 'x' | 'y' | ['x', 'y'] | null; /** * 显示的范围 */ range?: ZoomRange; /** * 平移 */ pan?: boolean; /** * 缩放 */ pinch?: boolean; /** * 横扫 */ swipe?: boolean; /** * 横扫动画时长 */ swipeDuration?: number; /** * 事件回调 */ onPanStart?: Function; onPinchStart?: Function; onPan?: Function; onPinch?: Function; onPanEnd?: Function; onPinchEnd?: Function; onInit?: Function; /** * 自动同步 x/y 的坐标值 */ autoFit?: boolean; /** * 最少展示数据量,用于控制最小缩放比例, 默认是10 */ minCount?: number; } export interface ZoomState { range: { x?: ZoomRange; y?: ZoomRange; }; } declare const _default: (View: any) => { new
(props: P): {
startRange: {
x?: ZoomRange;
y?: ZoomRange;
};
scale: {};
originScale: {};
minScale: number;
dims: Array;
container: import("@antv/g-lite").Group;
layout: import("@antv/f-engine").LayoutProps;
children: import("@antv/f-engine/es/canvas/vnode").VNode | import("@antv/f-engine/es/canvas/vnode").VNode[];
isMounted: boolean;
animate: boolean;
animator: import("@antv/f-engine/es/canvas/render/animator").default;
destroyed: boolean;
_vNode: import("@antv/f-engine/es/canvas/vnode").VNode;
shouldUpdate(_nextProps: P & ChartChildProps