diff --git a/package.json b/package.json index ee41eb8f6e..76b311a7da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6", - "version": "3.0.0-rc.4", + "version": "3.0.0", "description": "graph visualization frame work", "main": "build/g6.js", "homepage": "https://github.com/antvis/g6", diff --git a/src/global.js b/src/global.js index a32964ec23..c0cf91f440 100755 --- a/src/global.js +++ b/src/global.js @@ -3,7 +3,7 @@ */ module.exports = { - version: '3.0.0-rc.4', + version: '3.0.0', rootContainerClassName: 'root-container', nodeContainerClassName: 'node-container', edgeContainerClassName: 'edge-container', diff --git a/src/shape/edge.js b/src/shape/edge.js index 1345d4bc73..41490d7d1a 100644 --- a/src/shape/edge.js +++ b/src/shape/edge.js @@ -309,5 +309,8 @@ Shape.registerEdge('cubic-horizontal', { Shape.registerEdge('loop', { getPathPoints(cfg) { return Util.getLoopCfgs(cfg); + }, + getControlPoints(cfg) { + return cfg.controlPoints; } }, 'cubic'); diff --git a/src/util/graphic.js b/src/util/graphic.js index e43f01e912..6c6600cca8 100644 --- a/src/util/graphic.js +++ b/src/util/graphic.js @@ -51,7 +51,7 @@ const GraphicUtil = { .getMatrix(); const bbox = item.getKeyShape() .getBBox(); - const loopCfg = cfg.loopCfg; + const loopCfg = cfg.loopCfg || {}; // 距离keyShape边的最高距离 const dist = loopCfg.dist || Math.max(bbox.width, bbox.height) * 2; // 自环边与keyShape的相对位置关系