From fd0c52342f2eb0e6cbbf391d43f6c2a54f6347b5 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 11 Sep 2026 13:49:39 +0200 Subject: [PATCH] feat: drop plugin-side min window size; let Figma enforce its own limit --- src/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index 7c8bc3d..1145d19 100644 --- a/src/main.ts +++ b/src/main.ts @@ -179,11 +179,13 @@ export default function () { function clampWindowSize (size: { width: number; height: number }) { const b = figma.viewport.bounds const zoom = figma.viewport.zoom || 1 + // Upper bound only — based on the visible viewport. Figma itself enforces its own + // minimum window size, so we no longer clamp a floor here. const maxW = Math.max(320, Math.round(b.width * zoom)) const maxH = Math.max(200, Math.round(b.height * zoom)) return { - width: Math.max(320, Math.min(maxW, Math.round(size.width))), - height: Math.max(200, Math.min(maxH, Math.round(size.height))) + width: Math.min(maxW, Math.round(size.width)), + height: Math.min(maxH, Math.round(size.height)) } }