@visactor/vgrammar-core
Version:
VGrammar is a visual grammar library
34 lines (33 loc) • 1.85 kB
TypeScript
import type { ViewRoamOptions, IView, InteractionEvent, IScale, IData, IViewZoomMixin, IViewScrollMixin, IViewDragMixin, InteractionEventHandler } from '../types';
import { ViewNavigationBase } from './view-navigation-base';
export interface ViewRoam extends Pick<IViewDragMixin, 'handleDragStart' | 'handleDragEnd' | 'handleDragUpdate'>, Pick<IViewScrollMixin, 'formatScrollEvent' | 'handleScrollStart' | 'handleScrollEnd'>, Pick<IViewZoomMixin, 'formatZoomEvent' | 'handleZoomStart' | 'handleZoomEnd' | 'handleZoomReset' | 'updateZoomRange'>, ViewNavigationBase<ViewRoamOptions> {
}
export declare class ViewRoam extends ViewNavigationBase<ViewRoamOptions> {
static type: string;
type: string;
static defaultOptions: ViewRoamOptions;
protected _inited?: boolean;
protected _lastScale: number;
protected _scaleX: IScale;
protected _scaleY: IScale;
protected _data: IData;
protected handleRoamZoomStart: (e: InteractionEvent) => void;
protected handleRoamDragUpdate: (e: InteractionEvent) => void;
protected handleRoamScrollStart: (e: InteractionEvent) => void;
protected _isDragStarted?: boolean;
protected _isScrollStarted?: boolean;
protected _isZoomStarted?: boolean;
constructor(view: IView, option?: ViewRoamOptions);
protected getEvents(): {
type: string;
handler: InteractionEventHandler;
}[];
handleRoamZoomStartInner: (e: InteractionEvent) => void;
handleRoamZoomEnd: (e: InteractionEvent) => void;
handleRoamZoomReset: (e: InteractionEvent) => void;
handleRoamDragStart: (e: InteractionEvent) => void;
handleRoamDragUpdateInner: (e: InteractionEvent) => void;
handleRoamDragEnd: (e: InteractionEvent) => void;
handleRoamScrollStartInner: (e: InteractionEvent) => void;
handleRoamScrollEnd: (e: InteractionEvent) => void;
}