From 359b964033b72b8acfa633563eb30dc2128a2860 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 14 May 2026 16:22:59 +0800 Subject: [PATCH] fix: remove psd layer position controls --- .../agents/AgentPsdTemplateEditorDialog.tsx | 111 +----------------- 1 file changed, 4 insertions(+), 107 deletions(-) diff --git a/components/agents/AgentPsdTemplateEditorDialog.tsx b/components/agents/AgentPsdTemplateEditorDialog.tsx index 3c14db477..9330978b2 100644 --- a/components/agents/AgentPsdTemplateEditorDialog.tsx +++ b/components/agents/AgentPsdTemplateEditorDialog.tsx @@ -2092,10 +2092,6 @@ export function AgentPsdTemplateEditorDialog({ ? effectiveTextPositionOffsets[selectedTextLayer.id] || normalizeTextPositionOffset() : normalizeTextPositionOffset(); - const selectedLayerPositionOffset = selectedLayer - ? effectiveLayerPositionOffsets[selectedLayer.id] || - normalizeLayerPositionOffset() - : normalizeLayerPositionOffset(); const isSelectedImageExtending = Boolean( selectedImageLayer && extendingSlotId === selectedImageLayer.id ); @@ -2118,16 +2114,16 @@ export function AgentPsdTemplateEditorDialog({ return; } setHiddenLayerIds((current) => - current.filter((currentLayerId) => currentLayerId !== normalizedLayerId) + current.filter((currentLayerId) => currentLayerId !== normalizedLayerId) ); } const selectedLayerPositionPanel = selectedLayer ? (
-
图层位置
+
图层层级
- 现在所有图层都支持在中间预览区直接拖动,这里也能做数值微调。 + 选中图层后可调整与其他图层的上下关系。
@@ -2168,86 +2164,6 @@ export function AgentPsdTemplateEditorDialog({ 置于最下
-
-
- - { - const nextValue = Number(event.target.value); - if (!Number.isFinite(nextValue)) return; - updateLayerPositionOffset(selectedLayer.id, () => ({ - offsetX: nextValue, - })); - }} - type="number" - value={Math.round(selectedLayerPositionOffset.offsetX)} - /> -
-
- - { - const nextValue = Number(event.target.value); - if (!Number.isFinite(nextValue)) return; - updateLayerPositionOffset(selectedLayer.id, () => ({ - offsetY: nextValue, - })); - }} - type="number" - value={Math.round(selectedLayerPositionOffset.offsetY)} - /> -
-
-
-
- -
- - - -
- -
-
) : null; const selectedImageAdjustmentPanel = selectedImageLayer ? ( @@ -3087,25 +3003,6 @@ export function AgentPsdTemplateEditorDialog({ })); } - function nudgeLayerPositionOffset( - layerId: string, - deltaX: number, - deltaY: number - ) { - updateLayerPositionOffset(layerId, (current) => ({ - offsetX: current.offsetX + deltaX, - offsetY: current.offsetY + deltaY, - })); - } - - function resetLayerPositionOffset(layerId: string) { - setLayerPositionOffsets((current) => { - const next = { ...current }; - delete next[layerId]; - return next; - }); - } - function moveLayerOrder( layerId: string, direction: "forward" | "backward" | "front" | "back" @@ -5039,7 +4936,7 @@ export function AgentPsdTemplateEditorDialog({ 当前是普通图层
- 这个图层当前不支持替换图片或编辑文字,但现在已经支持在预览区直接拖动位置,也可以在上方做数值微调。 + 这个图层当前不支持替换图片或编辑文字,但可以在预览区直接拖动位置,也可以调整上下层级。