🐛 PDF 页签打开进度和白边问题 Fix https://github.com/siyuan-note/siyuan/issues/7671

This commit is contained in:
Vanessa 2023-03-15 12:04:51 +08:00
parent 878d06d0f6
commit 9567b24d76
3 changed files with 6 additions and 5 deletions

View file

@ -665,7 +665,8 @@ class PDFViewerApplication {
}
get loadingBar () {
const bar = new ProgressBar('loadingBar')
// NOTE
const bar = new ProgressBar(this.appConfig.appContainer.querySelector("#loadingBar"))
return shadow(this, 'loadingBar', bar)
}

View file

@ -699,8 +699,8 @@ class ProgressBar {
#visible = true;
constructor(id) {
const bar = document.getElementById(id);
// NOTE
constructor(bar) {
this.#classList = bar.classList;
}
@ -738,6 +738,7 @@ class ProgressBar {
this.#visible = false;
// NOTE
this.#classList.add("fn__hidden");
docStyle.setProperty("--progressBar-percent", "0");
}
show() {

View file

@ -248,7 +248,6 @@
position: absolute;
height: 4px;
background-color: var(--b3-theme-on-background);
border-bottom: 1px solid var(--b3-theme-surface-lighter);
transition-duration: 200ms;
transition-timing-function: ease;
z-index: 1;
@ -273,7 +272,7 @@
position: absolute;
top: 0;
left: 0;
width: 0%;
width: var(--progressBar-percent);
height: 100%;
background-color: var(--b3-theme-primary-light);
overflow: hidden;