Hide the struct tree layer during zooming

This commit is contained in:
Calixte Denizet 2023-02-07 14:38:32 +01:00
parent 05d821e680
commit 5bd352f69b
3 changed files with 19 additions and 0 deletions

View file

@ -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);