From c0f376c4cffc1ea320a983c120fb01e1f57cd448 Mon Sep 17 00:00:00 2001 From: 134 Date: Sun, 5 Jul 2026 14:23:41 +0800 Subject: [PATCH] fix: erase old footprint in scale guide --- app/api/canvas/local-edit/route.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/api/canvas/local-edit/route.ts b/app/api/canvas/local-edit/route.ts index e6e3488e0..e4c06ba9d 100644 --- a/app/api/canvas/local-edit/route.ts +++ b/app/api/canvas/local-edit/route.ts @@ -3188,6 +3188,18 @@ async function buildScaleAdjustVisualLayoutGuideBuffer(params: { if (structureLockAppliedRef) { structureLockAppliedRef.value = true; } + if (structureLockedComposite.method === "rect-crop-guide" && sourceRaw) { + sourceFootprintBoxes.push({ + ...placement.sourceFootprintBox, + background: estimateScaleAdjustBoxBackground({ + box: placement.sourceFootprintBox, + raw: sourceRaw, + width: sourceWidth, + }), + innerOpacity: 0.7, + opacity: 0.88, + }); + } subjectWashComposites.push(structureLockedComposite.wash); if (structureLockedComposite.compositeClip) { compositeClipComposites.push(structureLockedComposite.compositeClip); @@ -5029,7 +5041,7 @@ export async function POST(request: NextRequest) { scaleAdjustPromptStrategy: isScaleAdjustOperation ? scaleAdjustPatchReference ? useScaleAdjustFullFrameStructurePatch - ? "full-frame-source-locked-target-guide-v8-one-shot" + ? "full-frame-source-locked-target-guide-v9-erased-old-footprint-one-shot" : scaleAdjustPatchReference.structureLockedDraft ? "ai-patch-workspace-structure-locked-draft-v87-subject-alpha-clipped-one-shot" : "ai-patch-workspace-draft-v75-soft-wipe-erase-ghost-one-shot"