@logicflow/core
Version:
LogicFlow, help you quickly create flowcharts
47 lines (46 loc) • 1.29 kB
TypeScript
import { Component } from 'preact/compat';
import { GraphModel } from '../../model';
type IProps = {
graphModel: GraphModel;
};
export declare class Grid extends Component<IProps> {
gridOptions: Grid.GridOptions;
readonly id: string;
constructor(props: IProps);
renderDot(): import("preact/compat").JSX.Element;
renderMesh(): import("preact/compat").JSX.Element;
render(): import("preact/compat").JSX.Element;
}
export declare namespace Grid {
type GridOptions = {
/**
* 网格格子间距
*/
size?: number;
/**
* 网格是否可见
*/
visible?: boolean;
/**
* 网格类型
* - `dot` 点状网格
* - `mesh` 交叉线网格
*/
type?: 'dot' | 'mesh';
config?: {
/**
* 网格的颜色
*/
color?: string;
/**
* 网格的宽度
* - 对于 `dot` 点状网格,表示点的大小
* - 对于 `mesh` 交叉线网格,表示线的宽度
*/
thickness?: number;
};
};
const defaultProps: GridOptions;
function getGridOptions(options: number | boolean | GridOptions): GridOptions;
}
export {};