修改节点样式

This commit is contained in:
qumeng039@126.com 2025-08-11 17:33:25 +08:00
parent 1aa2036581
commit 94cb03ea43
2 changed files with 8 additions and 17 deletions

View File

@ -173,8 +173,8 @@ const disableZoom = () => {
}
onMounted(() => {
const cleanup = disableZoom()
onUnmounted(() => cleanup())
// const cleanup = disableZoom()
// onUnmounted(() => cleanup())
})
</script>

View File

@ -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.arc(0, 0, this.radius, 0, Math.PI * 2)
ctx.setLineDash([3, 3]) // 点状线
ctx.lineWidth = 0
ctx.strokeStyle = `#fff`
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()
}
this.paintText(ctx) //调用内部方法绘制文字
}