Fix: Controlling the presence of a button with ID="zoomOutBtn" (watch.js)

pull/3991/head
IgorA100 2024-05-14 17:11:30 +03:00 committed by GitHub
parent 8ac9eaac9e
commit a34a89cabe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 2 deletions

View File

@ -1005,11 +1005,16 @@ function manageCursor(Id) {
function initPage() {
// +++ Support of old ZoomPan algorithm
var useOldZoomPan = getCookie('zmUseOldZoomPan');
const btnZoomOutBtn = document.getElementById('zoomOutBtn'); //Zoom out button below Frame. She may not
if (useOldZoomPan) {
panZoomEnabled = false;
document.getElementById('zoomOutBtn').classList.remove("hidden");
if (btnZoomOutBtn) {
btnZoomOutBtn.classList.remove("hidden");
}
} else {
document.getElementById('zoomOutBtn').classList.add("hidden");
if (btnZoomOutBtn) {
btnZoomOutBtn.classList.add("hidden");
}
}
$j("#use-old-zoom-pan").click(function() {
useOldZoomPan = this.checked;