feat(canvas-v3): P2 第三批 gen Canvas 化
This commit is contained in:
1 parent
6a79eb432f
commit
db50733876
3 files changed
+8
-3
No files matched your search
@@ -130,7 +130,12 @@
|
||||
- 这些节点未选中时全部由 canvas 画卡片/标题/截断文本,DOM 0;
|
||||
- 选中后恢复 NodeCard;
|
||||
- 60 个混合节点(6 类各 10 个):off DOM 2580 → on 826,完整 NodeCard 0;
|
||||
- gen/out 仍走 DOM(涉及任务状态与结果网格,下一轮再迁)。
|
||||
- `gen` 已加入 Canvas 类型;`out` 仍走 DOM(涉及任务状态与结果网格,下一轮再迁)。
|
||||
### P2 第三批:gen
|
||||
|
||||
- `TYPES` 增加 `gen`;未选中 gen 节点改为 canvas 卡片(标题/摘要),选中恢复 NodeCard 配置;
|
||||
- `out` 仍走 DOM:它的结果网格依赖 gen/out 图数据与缩略图管线,不能只画占位;下一轮单独做。
|
||||
- 由于 `gen` 只做静态卡片,生成/任务状态仍以选中后的 NodeCard 为准。
|
||||
|
||||
注意:canvas 文本按视口缩放绘制,低倍率下只适合看卡片轮廓,精确阅读/编辑要选中。
|
||||
### P1 单层命中门禁(2026-12-01)
|
||||
|
||||
@@ -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: '文本', combine: '组合', batch: '连接', relay: '中继' }[n.type] || '节点'))
|
||||
const title = String((n.data && (n.data.title || n.data.name)) || ({ ref: '参考图', prompt: '提示词', textout: '文本', combine: '组合', batch: '连接', relay: '中继', gen: '生成配置' }[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', 'combine', 'batch', 'relay']
|
||||
const TYPES = ['ref', 'prompt', 'textout', 'combine', 'batch', 'relay', 'gen']
|
||||
global.IWBCanvasV3 = { KEY, TYPES, isEnabled, setEnabled, init, stats }
|
||||
})(typeof window !== 'undefined' ? window : globalThis)
|
||||
Reference in new issue
Block a user