fix: remove dynamic height logic that was breaking footer visibility
The dynamic height adjustment was setting a fixed height on .cv-paper, but the footer is a sibling element OUTSIDE .cv-paper in the DOM. This caused the footer to be positioned incorrectly and hidden. Removed: - dataset.originalHeight storage - height calculation and setting - All dynamic height adjustment logic The CSS transform: scale() will handle the visual zoom without affecting the natural document flow, allowing the footer to appear properly after the content. Result: Footer should now be visible at all zoom levels
This commit is contained in:
@@ -334,22 +334,9 @@
|
||||
// Store current scroll position
|
||||
const oldScrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
// Get the natural height before any transform
|
||||
if (!cvPaper.dataset.originalHeight) {
|
||||
// Store original height on first zoom
|
||||
cvPaper.style.transform = 'scale(1)';
|
||||
cvPaper.dataset.originalHeight = cvPaper.scrollHeight;
|
||||
}
|
||||
|
||||
const originalHeight = parseInt(cvPaper.dataset.originalHeight);
|
||||
|
||||
// Apply the new scale
|
||||
cvPaper.style.transform = `scale(${newScale})`;
|
||||
|
||||
// Adjust the container height to match the scaled content
|
||||
// This prevents empty space when zooming out and content overflow when zooming in
|
||||
cvPaper.style.height = `${originalHeight * newScale}px`;
|
||||
|
||||
// Calculate proportional scroll position to maintain visual position
|
||||
// If zooming from 100% to 50%, content at pixel 1000 moves to pixel 500
|
||||
// So we need to scroll to pixel 500 to see the same content
|
||||
|
||||
Reference in New Issue
Block a user