UNPKG

1.78 kBTypeScriptView Raw
1import { Point, TooltipOption } from '../../interface';
2import { Controller } from './base';
3/** @ignore */
4export default class Tooltip extends Controller<TooltipOption> {
5 private tooltip;
6 private tooltipMarkersGroup;
7 private tooltipCrosshairsGroup;
8 private xCrosshair;
9 private yCrosshair;
10 private guideGroup;
11 private isLocked;
12 private items;
13 private title;
14 private point;
15 get name(): string;
16 init(): void;
17 private isVisible;
18 render(): void;
19 /**
20 * Shows tooltip
21 * @param point
22 */
23 showTooltip(point: Point): void;
24 hideTooltip(): void;
25 /**
26 * lockTooltip
27 */
28 lockTooltip(): void;
29 /**
30 * unlockTooltip
31 */
32 unlockTooltip(): void;
33 /**
34 * isTooltipLocked
35 */
36 isTooltipLocked(): boolean;
37 clear(): void;
38 destroy(): void;
39 reset(): void;
40 changeVisible(visible: boolean): void;
41 getTooltipItems(point: Point): any[];
42 layout(): void;
43 update(): void;
44 /**
45 * 当前鼠标点是在 enter tooltip 中
46 * @param point
47 */
48 isCursorEntered(point: Point): boolean;
49 getTooltipCfg(): any;
50 protected processCustomContent(option: TooltipOption): TooltipOption;
51 private getTitle;
52 private renderTooltip;
53 private renderTooltipMarkers;
54 private renderCrosshairs;
55 private renderXCrosshairs;
56 private renderYCrosshairs;
57 private getCrosshairsText;
58 private getGuideGroup;
59 private getTooltipMarkersGroup;
60 private getTooltipCrosshairsGroup;
61 private findItemsFromView;
62 private getViewWithGeometry;
63 /**
64 * 根据用户配置的 items 配置,来进行用户自定义的处理,并返回最终的 items
65 * 默认不做任何处理
66 */
67 private getItemsAfterProcess;
68}