UNPKG

@antv/f6-plugin

Version:
51 lines (50 loc) 1.54 kB
import { IG6GraphEvent } from '@antv/f6-core'; import Base, { IPluginBaseConfig } from '../base'; interface TooltipConfig extends IPluginBaseConfig { getContent?: (evt?: IG6GraphEvent) => HTMLDivElement | string; offsetX?: number; offsetY?: number; shouldBegin?: (evt?: IG6GraphEvent) => boolean; itemTypes?: string[]; trigger?: 'mouseenter' | 'click'; fixToNode?: [number, number] | undefined; } export default class Tooltip extends Base { private currentTarget; getDefaultCfgs(): TooltipConfig; getEvents(): { 'node:tap': string; 'edge:tap': string; 'combo:tap': string; 'canvas:tap': string; afterremoveitem: string; contextmenu: string; drag: string; 'node:press'?: undefined; 'edge:press'?: undefined; 'combo:press'?: undefined; 'canvas:press'?: undefined; } | { 'node:press': string; 'edge:press': string; 'combo:press': string; 'canvas:press': string; 'node:tap': string; 'edge:tap': string; 'combo:tap': string; 'canvas:tap': string; afterremoveitem: string; contextmenu: string; drag: string; }; onClick(e: IG6GraphEvent): void; onMouseEnter(e: IG6GraphEvent): void; onMouseMove(e: IG6GraphEvent): void; onMouseLeave(): void; showTooltip(e: IG6GraphEvent): void; hideTooltip(): void; updatePosition(e: IG6GraphEvent): void; hide(): void; destroy(): void; } export {};