Feat:增加禁止调整关联线端点位置的配置

This commit is contained in:
街角小林 2024-01-15 18:34:19 +08:00
parent bb223b080c
commit 925c5d6d3c
2 changed files with 4 additions and 1 deletions

View File

@ -263,5 +263,7 @@ export const defaultOpt = {
// from和to可选值left、top、bottom、right
from: '', // 关联线起始节点上端点的位置
to: '' // 关联线目标节点上端点的位置
}
},
// 是否允许调整关联线两个端点的位置
enableAdjustAssociativeLinePoints: true
}

View File

@ -221,6 +221,7 @@ function resetControlPoint() {
// 渲染控制点
function renderControls(startPoint, endPoint, point1, point2) {
if (!this.mindMap.opt.enableAdjustAssociativeLinePoints) return
if (!this.controlLine1) {
this.createControlNodes()
}