feat(canvas-v3): P2 第二批 combine/batch/relay Canvas 化
This commit is contained in:
1 parent
f9caea2cfd
commit
6a79eb432f
3 files changed
+11
-2
No files matched your search
@@ -124,6 +124,15 @@
|
||||
文本是 Canvas 截断绘制,不是 Markdown/DOM 排版;只在选中后回到真实 NodeCard 编辑。
|
||||
|
||||
点击验证:prompt 卡片中心(n25)点击后 selected=1、NodeCard=1、DOM 826→873,说明文本节点的 canvas 命中也能恢复 DOM 编辑。
|
||||
### P2 第二批:combine / batch / relay
|
||||
|
||||
- `IWBCanvasV3.TYPES` 扩到 `ref,prompt,textout,combine,batch,relay`;
|
||||
- 这些节点未选中时全部由 canvas 画卡片/标题/截断文本,DOM 0;
|
||||
- 选中后恢复 NodeCard;
|
||||
- 60 个混合节点(6 类各 10 个):off DOM 2580 → on 826,完整 NodeCard 0;
|
||||
- gen/out 仍走 DOM(涉及任务状态与结果网格,下一轮再迁)。
|
||||
|
||||
注意:canvas 文本按视口缩放绘制,低倍率下只适合看卡片轮廓,精确阅读/编辑要选中。
|
||||
### P1 单层命中门禁(2026-12-01)
|
||||
|
||||
- `src/canvas-v3-hit.js` + 单元测试接入 `test:unit`;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
// 标题
|
||||
ctx.fillStyle = text
|
||||
ctx.font = '600 ' + Math.max(10, 12 / scale * 0.9) + 'px -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif'
|
||||
const title = String((n.data && (n.data.title || n.data.name)) || ({ ref: '参考图', prompt: '提示词', textout: '文本' }[n.type] || '节点'))
|
||||
const title = String((n.data && (n.data.title || n.data.name)) || ({ ref: '参考图', prompt: '提示词', textout: '文本', combine: '组合', batch: '连接', relay: '中继' }[n.type] || '节点'))
|
||||
ctx.save()
|
||||
ctx.beginPath(); ctx.rect(x + 10, y, Math.max(0, nw - 20), headH); ctx.clip()
|
||||
ctx.fillText(title, x + 12, y + 21)
|
||||
|
||||
+1
-1
@@ -61,6 +61,6 @@
|
||||
}
|
||||
|
||||
// P2 第一批:ref 图片节点 + prompt/textout 文本类节点。
|
||||
const TYPES = ['ref', 'prompt', 'textout']
|
||||
const TYPES = ['ref', 'prompt', 'textout', 'combine', 'batch', 'relay']
|
||||
global.IWBCanvasV3 = { KEY, TYPES, isEnabled, setEnabled, init, stats }
|
||||
})(typeof window !== 'undefined' ? window : globalThis)
|
||||
Reference in new issue
Block a user