mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Re-factor the loading-icons used in the viewer toolbars
Currently the SVG images for the loading-icons exist in two versions, for the light- respectively dark-theme, which nowadays are the only "duplicated" icons left. The reason for this is that these icons are being used in `input`-elements, where the regular `mask-image` approach used for all buttons don't work. To address this we add containers for the `input`-elements, such that we have a "regular" DOM-element where we can use `mask-image`.
This commit is contained in:
parent
086a5921dc
commit
625d4f794e
4 changed files with 56 additions and 64 deletions
|
@ -22,8 +22,6 @@ import {
|
|||
toggleCheckedBtn,
|
||||
} from "./ui_utils.js";
|
||||
|
||||
const PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading";
|
||||
|
||||
/**
|
||||
* @typedef {Object} ToolbarOptions
|
||||
* @property {HTMLDivElement} container - Container for the secondary toolbar.
|
||||
|
@ -300,7 +298,7 @@ class Toolbar {
|
|||
updateLoadingIndicatorState(loading = false) {
|
||||
const { pageNumber } = this.items;
|
||||
|
||||
pageNumber.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading);
|
||||
pageNumber.classList.toggle("loading", loading);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue