增添PTree结构
This commit is contained in:
@@ -3,7 +3,7 @@ import { ModelOption, Style } from "../options";
|
||||
import { BoundingRect } from "../Common/boundingRect";
|
||||
import { EdgeConfig, Item, NodeConfig } from "@antv/g6-core";
|
||||
import { Point } from "@antv/g-base";
|
||||
import { Graph } from "_@antv_g6-pc@0.5.0@@antv/g6-pc";
|
||||
import { Graph } from "@antv/g6-pc";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export default registerNode('indexed-node', {
|
||||
}
|
||||
|
||||
const indexCfg = cfg.indexCfg;
|
||||
const offset = 20;
|
||||
const offset = Number(cfg.style.offset) || 20;
|
||||
const indexPositionMap: { [key: string]: (width: number, height: number) => { x: number, y: number } } = {
|
||||
top: (width: number, height: number) => ({ x: width, y: height / 2 - offset }),
|
||||
right: (width: number, height: number) => ({ x: width * 1.5 + offset, y: height }),
|
||||
|
||||
Reference in New Issue
Block a user