diff --git a/web/pdf_sidebar.js b/web/pdf_sidebar.js index 8c3e53bd1..d61c2bc51 100644 --- a/web/pdf_sidebar.js +++ b/web/pdf_sidebar.js @@ -59,8 +59,6 @@ const UI_NOTIFICATION_CLASS = "pdfSidebarNotification"; * the attachments are placed. * @property {HTMLDivElement} layersView - The container in which * the layers are placed. - * @property {HTMLDivElement} outlineOptionsContainer - The container in which - * the outline view-specific option button(s) are placed. * @property {HTMLButtonElement} currentOutlineItemButton - The button used to * find the current outline item. */ @@ -107,7 +105,6 @@ class PDFSidebar { this.attachmentsView = elements.attachmentsView; this.layersView = elements.layersView; - this._outlineOptionsContainer = elements.outlineOptionsContainer; this._currentOutlineItemButton = elements.currentOutlineItemButton; this.eventBus = eventBus; @@ -227,12 +224,6 @@ class PDFSidebar { this.layersView ); - // Finally, update view-specific CSS classes. - this._outlineOptionsContainer.classList.toggle( - "hidden", - view !== SidebarView.OUTLINE - ); - if (forceOpen && !this.isOpen) { this.open(); return; // Opening will trigger rendering and dispatch the event. diff --git a/web/viewer.css b/web/viewer.css index 626d141f8..43325ad7d 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -1301,6 +1301,14 @@ a:focus > .thumbnail > .thumbnailImage, color: var(--treeitem-hover-color); } +#outlineOptionsContainer { + display: none; + + #sidebarContainer:has(#outlineView:not(.hidden)) & { + display: inherit; + } +} + .dialogButton { width: auto; margin: 3px 4px 2px !important; diff --git a/web/viewer.html b/web/viewer.html index 4eaf14bf6..5c201db03 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -113,7 +113,7 @@ See https://github.com/adobe-type-tools/cmap-resources
-