Deselect All Bug fix

Deselect All button no longer appears after Page Select is turned off
This commit is contained in:
JoseQuintas2021 2025-04-23 14:51:28 +01:00
parent d64fec090f
commit f66cadaf2c

View File

@ -587,6 +587,8 @@ class PdfContainer {
const selectIcon = document.getElementById('select-All-Container'); const selectIcon = document.getElementById('select-All-Container');
const deselectIcon = document.getElementById('deselect-All-Container'); const deselectIcon = document.getElementById('deselect-All-Container');
if (window.selectPage) { // Check if selectPage mode is active
console.log("Page Select on. Showing buttons");
//Check if no pages are selected //Check if no pages are selected
if (window.selectedPages.length === 0) { if (window.selectedPages.length === 0) {
this.showButton(selectIcon, true); this.showButton(selectIcon, true);
@ -604,6 +606,11 @@ class PdfContainer {
} else { } else {
this.showButton(selectIcon, true); this.showButton(selectIcon, true);
} }
} else {
console.log("Page Select off. Hidding buttons");
this.showButton(selectIcon, false);
this.showButton(deselectIcon, false);
}
} }
parsePageRanges(ranges) { parsePageRanges(ranges) {