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) //调用内部方法绘制文字 }