fix: allow horizontal scroll and content expansion when zoomed beyond viewport

This commit is contained in:
juanatsap
2025-11-12 16:53:28 +00:00
parent 3aeaf3db43
commit ff93a3f314
2 changed files with 15 additions and 3 deletions
+11
View File
@@ -357,6 +357,17 @@
// Use CSS zoom property - it properly affects layout and extends beyond viewport
zoomWrapper.style.zoom = zoomLevel;
// When zoom > 100%, set a min-width to allow horizontal expansion beyond viewport
// This allows the content to grow larger than the viewport width
if (zoomLevel > 1) {
const viewportWidth = window.innerWidth;
// Set min-width to ensure content can expand beyond viewport
zoomWrapper.style.minWidth = `${viewportWidth}px`;
} else {
// Reset to default when zoom <= 100%
zoomWrapper.style.minWidth = '';
}
// Update display
updateZoomDisplay(zoomValue);