fix(studio): an iPhone keeps the repair off WebGPU, off the worker pool and at 384 pixels, the three things its page did not survive

This commit is contained in:
2026-10-14 09:50:51 +07:00
parent b7f63f488a
commit 8fee6693bf
2 changed files with 50 additions and 46 deletions
+1 -1
View File
@@ -1455,7 +1455,7 @@ export async function renderPhoto(input: RenderInput): Promise<RenderResult | nu
const my0 = Math.min(...ys) - widest;
const mx1 = Math.max(...xs) + widest;
const my1 = Math.max(...ys) + widest;
const margin = Math.max(16, 0.5 * Math.max(mx1 - mx0, my1 - my0));
const margin = Math.max(16, Math.min(64, Math.round(Math.max(widest * 1.5, 0.25 * Math.max(mx1 - mx0, my1 - my0)))));
const srcLeft = Math.max(boxLeft, Math.floor(mx0 - margin));
const srcTop = Math.max(boxTop, Math.floor(my0 - margin));
const srcRight = Math.min(boxRight, Math.ceil(mx1 + margin));