From 925c5d6d3c7562acdb8f219842a0d646a42f2704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Mon, 15 Jan 2024 18:34:19 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=A2=9E=E5=8A=A0=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E8=B0=83=E6=95=B4=E5=85=B3=E8=81=94=E7=BA=BF=E7=AB=AF?= =?UTF-8?q?=E7=82=B9=E4=BD=8D=E7=BD=AE=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/constants/defaultOptions.js | 4 +++- .../src/plugins/associativeLine/associativeLineControls.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/simple-mind-map/src/constants/defaultOptions.js b/simple-mind-map/src/constants/defaultOptions.js index 5d760b38..cf47a42d 100644 --- a/simple-mind-map/src/constants/defaultOptions.js +++ b/simple-mind-map/src/constants/defaultOptions.js @@ -263,5 +263,7 @@ export const defaultOpt = { // from和to可选值:left、top、bottom、right from: '', // 关联线起始节点上端点的位置 to: '' // 关联线目标节点上端点的位置 - } + }, + // 是否允许调整关联线两个端点的位置 + enableAdjustAssociativeLinePoints: true } diff --git a/simple-mind-map/src/plugins/associativeLine/associativeLineControls.js b/simple-mind-map/src/plugins/associativeLine/associativeLineControls.js index a2a4bb90..ec550100 100644 --- a/simple-mind-map/src/plugins/associativeLine/associativeLineControls.js +++ b/simple-mind-map/src/plugins/associativeLine/associativeLineControls.js @@ -221,6 +221,7 @@ function resetControlPoint() { // 渲染控制点 function renderControls(startPoint, endPoint, point1, point2) { + if (!this.mindMap.opt.enableAdjustAssociativeLinePoints) return if (!this.controlLine1) { this.createControlNodes() }