Files
lan-manager/web/node_modules/@antv/g6-plugin/lib/minimap/index.d.ts
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

93 lines
2.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Canvas as GCanvas } from '@antv/g-canvas';
import { ShapeStyle, IAbstractGraph as IGraph } from '@antv/g6-core';
import Base, { IPluginBaseConfig } from '../base';
interface MiniMapConfig extends IPluginBaseConfig {
viewportClassName?: string;
type?: 'default' | 'keyShape' | 'delegate';
size?: number[];
delegateStyle?: ShapeStyle;
refresh?: boolean;
padding?: number;
hideEdge?: boolean;
}
export default class MiniMap extends Base {
constructor(config?: MiniMapConfig);
this: IGraph;
getDefaultCfgs(): MiniMapConfig;
getEvents(): {
beforepaint: string;
beforeanimate: string;
afteranimate: string;
viewportchange: string;
};
protected disableRefresh(): void;
protected enableRefresh(): void;
protected disableOneRefresh(): void;
private initViewport;
/**
* 更新 viewport 视图
*/
private updateViewport;
/**
* 将主图上的图形完全复制到小图
*/
private updateGraphShapes;
private updateVisible;
private updateKeyShapes;
/**
* 增加/更新单个元素的 keyShape
* @param item ICombo 实例
*/
private updateOneComboKeyShape;
/**
* 增加/更新单个元素的 keyShape
* @param item INode 实例
*/
private updateOneNodeKeyShape;
/**
* Minimap 中展示自定义的rect支持用户自定义样式和节点大小
*/
private updateDelegateShapes;
private clearDestroyedShapes;
/**
* 设置只显示 edge 的 keyShape
* @param item IEdge 实例
*/
private updateOneEdgeKeyShape;
/**
* Minimap 中展示自定义的 rect支持用户自定义样式和节点大小
* 增加/更新单个元素
* @param item INode 实例
*/
private updateOneNodeDelegateShape;
/**
* 主图更新的监听函数,使用 debounce 减少渲染频率
* e.g. 拖拽节点只会在松手后的 100ms 后执行 updateCanvas
* e.g. render 时大量 addItem 也只会执行一次 updateCanvas
*/
private handleUpdateCanvas;
init(): void;
/**
* 初始化 Minimap 的容器
*/
initContainer(): void;
updateCanvas(): void;
/**
* 获取minimap的画布
* @return {GCanvas} G的canvas实例
*/
getCanvas(): GCanvas;
/**
* 获取minimap的窗口
* @return {HTMLElement} 窗口的dom实例
*/
getViewport(): HTMLElement;
/**
* 获取minimap的容器dom
* @return {HTMLElement} dom
*/
getContainer(): HTMLElement;
destroy(): void;
}
export {};