Fix compact donut detection: use height threshold for landscape phones

iPhone 17 Pro Max landscape viewport is ~956px wide, above the 850px
threshold. Use height <= 500px instead to detect all landscape phones
regardless of width.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Anton Volnuhin 2026-02-07 23:29:27 +03:00
parent 029e428bb4
commit 4a604d6d54

2
app.js
View File

@ -2765,7 +2765,7 @@ function adjustChartSize() {
const screenWidth = window.innerWidth; const screenWidth = window.innerWidth;
const isMobile = screenWidth <= 500; const isMobile = screenWidth <= 500;
const isLandscapePhone = screenWidth <= 850 && window.innerHeight < window.innerWidth; const isLandscapePhone = window.innerHeight < window.innerWidth && window.innerHeight <= 500;
const isCompact = isMobile || isLandscapePhone; const isCompact = isMobile || isLandscapePhone;
// Compact mode (portrait phones + landscape phones): extend layers to fill container // Compact mode (portrait phones + landscape phones): extend layers to fill container