UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

33 lines (32 loc) 724 B
/** 负责将shape数据转为node,使shape根据node数据进行update */ import { Shape } from '@antv/g'; interface NodesCfg { shapes: Shape[]; } export interface IShapeNode { width: number; height: number; centerX: number; centerY: number; top: number; bottom: number; left: number; right: number; topLeft?: {}; topRight?: {}; bottomLeft?: {}; bottomRight?: {}; shape?: Shape; } export default class ShapeNodes { shapes: Shape[]; nodes: IShapeNode[]; origion_nodes: IShapeNode[]; type: string; constructor(cfg: NodesCfg); measure(shape: any): any; measureNodes(): void; updateShapes(): void; private _parserNodes; } export {};