修复图片改造尺寸保持

保持图片改造提交与画布回填的原图尺寸
在 VectorEngine 边界对齐非 16 倍数参考图并恢复目标尺寸
补充前后端回归测试与编辑器尺寸契约文档
This commit is contained in:
2026-07-11 18:10:00 +08:00
parent d756e8e04b
commit 300e69c97d
9 changed files with 243 additions and 54 deletions
@@ -247,18 +247,10 @@ export function applyImageEditResultToSourceLayer({
sourceLayer: CanvasLayer;
generationInputs: CanvasGenerationInputs;
}): CanvasLayer {
const originalWidth =
generated.width || sourceLayer.originalWidth || sourceLayer.width;
const originalHeight =
generated.height || sourceLayer.originalHeight || sourceLayer.height;
const { width, height } = resolveLayerResolutionSize(
originalWidth,
originalHeight,
{
width: sourceLayer.width,
height: sourceLayer.height,
},
);
const originalWidth = sourceLayer.originalWidth || sourceLayer.width;
const originalHeight = sourceLayer.originalHeight || sourceLayer.height;
const width = sourceLayer.width;
const height = sourceLayer.height;
return applyGeneratedMetadata(
{
...sourceLayer,