增添PTree结构

This commit is contained in:
zgt
2021-12-13 22:05:13 +08:00
parent f6ab581815
commit 6a0139eaeb
6 changed files with 146 additions and 14270 deletions
+1 -1
View File
@@ -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";
+1 -1
View File
@@ -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 }),