feat(canvas-v3): P1 单层 canvas 命中,移除每节点 proxy/端口 DOM

This commit is contained in:
qiqi committed 2026-12-01 00:19:15 +08:00
1 parent 1d40e74ead
commit 84d2c1d896
15 files changed
+173 -38

No files matched your search

+8 -1
View File
@@ -112,7 +112,14 @@
ctx.font = Math.max(10, 12 / scale * 0.9) + 'px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif'
ctx.fillText(entry && entry.failed ? '图片源失效' : '图片加载中…', ix + 12, iy + 24)
}
// 选中/连线提示用边框色(当前未选中,保留扩展点)
// 端口:canvas 命中测试用同一坐标;选中后由 NodeCard DOM 端口接管。
const portR = Math.max(2, 4 / scale)
ctx.fillStyle = bg
ctx.strokeStyle = border
ctx.lineWidth = 1 / scale
for (const [px, py] of [[x, y + nh / 2], [x + nw, y + nh / 2]]) {
ctx.beginPath(); ctx.arc(px, py, portR, 0, Math.PI * 2); ctx.fill(); ctx.stroke()
}
void accent
}
}