UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

33 lines (32 loc) 1.43 kB
import { BBox } from '@antv/g'; import { Interaction, View } from '@antv/g2'; import ViewLayer from '../base/view-layer'; import { IInteractionConfig } from '../interface/config'; export interface InteractionCtor { new (cfg: { view: View; }, viewLayer: ViewLayer<any>, interactionRange?: BBox, interaction?: IInteractionConfig): BaseInteraction; getInteractionRange(layerRange: BBox, interaction?: IInteractionConfig): BBox; } export default abstract class BaseInteraction extends Interaction { static registerInteraction(type: string, ctor: any): void; static registerPlotInteraction(plotType: string, type: string, ctor: any): void; static getInteraction(type: string, plotType?: string): InteractionCtor | undefined; static getInteractionRange(layerRange: BBox, interaction?: IInteractionConfig): BBox | undefined; private static GLOBAL_INTERACTION_MAP; private static PLOT_INTERACTION_MAP; type: string; cfg: any; private interactionConfig; private interactionRange; private viewLayer; constructor(cfg: { view: View; }, viewLayer: ViewLayer<any>, interactionRange?: BBox, interaction?: IInteractionConfig); destroy(): void; protected getViewLayer(): ViewLayer<any>; protected getRange(): BBox | undefined; protected getInteractionConfig(): IInteractionConfig | undefined; protected render(): void; protected clear(): void; }