修改节点样式
This commit is contained in:
parent
1aa2036581
commit
94cb03ea43
|
|
@ -173,8 +173,8 @@ const disableZoom = () => {
|
|||
}
|
||||
|
||||
onMounted(() => {
|
||||
const cleanup = disableZoom()
|
||||
onUnmounted(() => cleanup())
|
||||
// const cleanup = disableZoom()
|
||||
// onUnmounted(() => cleanup())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -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) //调用内部方法绘制文字
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user