fix: remove blue active state from zoom button and restore Show Zoom menu item
- Removed .zoom-active CSS class and JavaScript logic - Zoom button stays same gray color whether zoom is on or off - Fixed Show Zoom menu button visibility (changed inline style to zoom-hidden class) - Menu item now correctly appears when zoom is hidden
This commit is contained in:
+3
-10
@@ -362,12 +362,12 @@
|
||||
if (show) {
|
||||
zoomControl.classList.remove('zoom-hidden');
|
||||
if (showBtn) showBtn.classList.add('zoom-hidden');
|
||||
if (toggleBtn) toggleBtn.classList.add('zoom-active');
|
||||
// Don't add zoom-active class - button stays same color
|
||||
localStorage.setItem('cv-zoom-visible', 'true');
|
||||
} else {
|
||||
zoomControl.classList.add('zoom-hidden');
|
||||
if (showBtn) showBtn.classList.remove('zoom-hidden');
|
||||
if (toggleBtn) toggleBtn.classList.remove('zoom-active');
|
||||
// Don't remove zoom-active class - wasn't added
|
||||
localStorage.setItem('cv-zoom-visible', 'false');
|
||||
}
|
||||
}
|
||||
@@ -403,15 +403,8 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Set initial toggle button state (only active if explicitly 'true')
|
||||
// No need to set initial state since we don't use zoom-active class anymore
|
||||
const isVisible = localStorage.getItem('cv-zoom-visible');
|
||||
if (toggleBtn) {
|
||||
if (isVisible === 'true') {
|
||||
toggleBtn.classList.add('zoom-active');
|
||||
} else {
|
||||
toggleBtn.classList.remove('zoom-active');
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Zoom control initialized. localStorage cv-zoom-visible:', isVisible);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user