fix: restore psd preview layer stacking
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-05-14 16:15:32 +08:00
parent 5f90dbde67
commit 96d9551e54

View File

@ -1942,9 +1942,8 @@ export function AgentPsdTemplateEditorDialog({
[orderedEditableLayers]
);
const layerStackZIndexById = useMemo(() => {
const total = orderedPreviewLayers.length;
return new Map(
orderedPreviewLayers.map((layer, index) => [layer.id, total - index])
orderedPreviewLayers.map((layer, index) => [layer.id, index + 1])
);
}, [orderedPreviewLayers]);
const shouldShowCompositeFallback = useMemo(