import type { RuntimeContext } from '../runtime/types'; import { BasePlugin, BasePluginOptions } from './base-plugin'; /** * 网格线配置项 * * Grid line options */ export interface GridLineOptions extends BasePluginOptions { /** * 网格线颜色 * * Grid line color * @defaultValue '#0001' */ stroke?: string; /** * 网格线宽 * * Grid line width * @defaultValue 1 */ lineWidth?: number | string; /** * 单个网格的大小 * * The size of a single grid * @defaultValue 20 */ size?: number; /** * 是否显示边框 * * Whether to show the border * @defaultValue true */ border?: boolean; /** * 边框线宽 * * Border line width * @defaultValue 1 */ borderLineWidth?: number; /** * 边框颜色 * * Border color * @defaultValue '#0001' * @remarks * 完整属性定义参考 [CSS border-color](https://developer.mozilla.org/zh-CN/docs/Web/CSS/border-color) * * Refer to [CSS border-color](https://developer.mozilla.org/en-US/docs/Web/CSS/border-color) for the complete property definition */ borderStroke?: string; /** * 边框样式 * * Border style * @defaultValue 'solid' * @remarks * 完整属性定义参考 [CSS border-style](https://developer.mozilla.org/zh-CN/docs/Web/CSS/border-style) * * Refer to [CSS border-style](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style) for the complete property definition */ borderStyle?: string; /** * 是否跟随图移动 * * Whether to follow with the graph * @defaultValue false */ follow?: boolean | { /** * 是否跟随图平移 * * Whether to follow the graph translation */ translate?: boolean; /** * 是否跟随图缩放 * * Whether to follow the graph zoom */ zoom?: boolean; }; } /** * 网格线 * * Grid line * @remarks * 网格线插件,多用于辅助绘图 * * Grid line plugin, often used to auxiliary drawing */ export declare class GridLine extends BasePlugin { static defaultOptions: Partial; private $element; private offset; private currentScale; private baseSize; constructor(context: RuntimeContext, options: GridLineOptions); /** * 更新网格线配置 * * Update the configuration of the grid line * @param options - 配置项 | options * @internal */ update(options: Partial): void; private bindEvents; private updateStyle; private updateOffset; private followZoom; private followTranslate; private parseFollow; private onTransform; /** * 销毁网格线 * * Destroy the grid line * @internal */ destroy(): void; }