diff --git a/components/canvas/CanvasWorkspace.tsx b/components/canvas/CanvasWorkspace.tsx index 3a2ff49..b97ea0e 100644 --- a/components/canvas/CanvasWorkspace.tsx +++ b/components/canvas/CanvasWorkspace.tsx @@ -247,8 +247,8 @@ export function CanvasWorkspace() { }} /> - {/* 节点层 - 使用虚拟化渲染 */} -
+ {/* 节点层 - 使用虚拟化渲染,允许工具栏溢出 */} +
{visibleNodes.map(renderNode)}
diff --git a/components/canvas/nodes/ImageNode.tsx b/components/canvas/nodes/ImageNode.tsx index 085bb9a..9265fcc 100644 --- a/components/canvas/nodes/ImageNode.tsx +++ b/components/canvas/nodes/ImageNode.tsx @@ -322,10 +322,21 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) { return ( <> + {/* 选中时在图片上方显示标题和尺寸 */} + {isSelected && data.src && ( +
+
+ + {data.prompt || '图片'} +
+ {node.size.width} × {node.size.height} +
+ )} +
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} @@ -381,91 +392,115 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
)} - {/* 选中时显示的顶部工具栏 - 和聊天窗口中的功能一致 */} + {/* 选中时显示的顶部工具栏 - 放在图片内部顶部,避免被裁剪 */} {isSelected && data.src && !isProcessing && (
e.stopPropagation()} > + {/* 放大/高清 */} - + + {/* 移除背景/抠图 */} + + {/* 场景融合 */} - - -
+ + {/* 角度编辑 */} + + {/* 扩展 */} + + {/* 尺寸调整 */} + + + {/* 更多操作 */} + + + + + + + + 下载图片 + + + deleteNode(node.id)} + className="text-destructive focus:text-destructive" + > + + 删除 + + +
)}