From 94cb03ea4301b3c8ac9150eecf730dc7817a9360 Mon Sep 17 00:00:00 2001 From: "qumeng039@126.com" <86925389+qumen@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8A=82=E7=82=B9=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++-- src/utils/customePaint.js | 21 ++++++--------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/App.vue b/src/App.vue index 6578c31..582f3f2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -173,8 +173,8 @@ const disableZoom = () => { } onMounted(() => { - const cleanup = disableZoom() - onUnmounted(() => cleanup()) + // const cleanup = disableZoom() + // onUnmounted(() => cleanup()) }) diff --git a/src/utils/customePaint.js b/src/utils/customePaint.js index 5687192..338403b 100644 --- a/src/utils/customePaint.js +++ b/src/utils/customePaint.js @@ -31,21 +31,12 @@ export const paintNodeFunction = function (ctx, onlyShape) { } //按节点类型绘制节点边框 - if (this.properties.type != "normal") { - ctx.beginPath() - ctx.arc(0, 0, this.radius + 6, 0, Math.PI * 2) - ctx.lineWidth = 8 - ctx.strokeStyle = `rgba(${this.fillColor},${this.alpha * 0.4})` - ctx.stroke() - } else { - ctx.beginPath() - ctx.arc(0, 0, this.radius + 8, 0, Math.PI * 2) - ctx.lineWidth = 12 - ctx.setLineDash([4, 4]) - ctx.strokeStyle = `rgba(${this.fillColor},${this.alpha * 0.6})` - ctx.stroke() - } - + ctx.beginPath() + ctx.arc(0, 0, this.radius, 0, Math.PI * 2) + ctx.setLineDash([3, 3]) // 点状线 + ctx.lineWidth = 0 + ctx.strokeStyle = `#fff` + ctx.stroke() this.paintText(ctx) //调用内部方法绘制文字 }