From 1b0646af6d7c0d5f9fa76a23f103b81798dfc0b1 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Sun, 27 Aug 2023 22:51:18 +0800 Subject: [PATCH] =?UTF-8?q?Feat:=E8=8A=82=E7=82=B9=E7=9F=A9=E5=BD=A2?= =?UTF-8?q?=E5=BD=A2=E7=8A=B6=E6=94=B9=E4=B8=BA=E4=BD=BF=E7=94=A8path?= =?UTF-8?q?=E6=B8=B2=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simple-mind-map/src/core/render/node/Shape.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/simple-mind-map/src/core/render/node/Shape.js b/simple-mind-map/src/core/render/node/Shape.js index f6d0e0df..a9ff7816 100644 --- a/simple-mind-map/src/core/render/node/Shape.js +++ b/simple-mind-map/src/core/render/node/Shape.js @@ -104,11 +104,18 @@ export default class Shape { let { width, height } = this.node let borderRadius = this.node.style.merge('borderRadius') return new Path().plot(` - M${0},0 - L${width},0 - L${width},${height} - L${0},${height} - L${0},${0} + M${borderRadius},0 + L${width - borderRadius},0 + C${width - borderRadius},0 ${width},${0} ${width},${borderRadius} + L${width},${height - borderRadius} + C${width},${height - borderRadius} ${width},${height} ${ + width - borderRadius + },${height} + L${borderRadius},${height} + C${borderRadius},${height} ${0},${height} ${0},${height - borderRadius} + L${0},${borderRadius} + C${0},${borderRadius} ${0},${0} ${borderRadius},${0} + Z `) }