mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Hide the struct tree layer during zooming
This commit is contained in:
parent
05d821e680
commit
5bd352f69b
3 changed files with 19 additions and 0 deletions
|
@ -87,6 +87,18 @@ class StructTreeLayerBuilder {
|
|||
return (this.#treeDom = treeDom);
|
||||
}
|
||||
|
||||
hide() {
|
||||
if (this.#treeDom && !this.#treeDom.hidden) {
|
||||
this.#treeDom.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
show() {
|
||||
if (this.#treeDom?.hidden) {
|
||||
this.#treeDom.hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
#setAttributes(structElement, htmlElement) {
|
||||
if (structElement.alt !== undefined) {
|
||||
htmlElement.setAttribute("aria-label", structElement.alt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue