fix: allow horizontal scroll and content expansion when zoomed beyond viewport
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user