This commit is contained in:
gpt-engineer-app[bot]
2026-01-09 11:20:38 +00:00
parent 192164ee74
commit 0bf52ba489
4 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -50,19 +50,19 @@ const Breakout = () => {
const { enterFullscreen, exitFullscreen } = useBrowserFullscreen();
const getCanvasSize = useCallback(() => {
if (typeof window === 'undefined') return { width: 480, height: 580 };
if (typeof window === 'undefined') return { width: 560, height: 680 };
const isMobile = window.innerWidth < 768;
if (isMobile) {
const maxWidth = window.innerWidth - 32;
// Reserve space for header + fixed controls dock on mobile
const maxHeight = window.innerHeight - 380;
const aspectRatio = 480 / 580;
const aspectRatio = 560 / 680;
let width = maxWidth;
let height = width / aspectRatio;
if (height > maxHeight) { height = maxHeight; width = height * aspectRatio; }
return { width: Math.floor(width), height: Math.floor(height) };
}
return isFullscreen ? { width: 600, height: 720 } : { width: 480, height: 580 };
return isFullscreen ? { width: 700, height: 840 } : { width: 560, height: 680 };
}, [isFullscreen]);
const [canvasSize, setCanvasSize] = useState(getCanvasSize);