Skip to content

Commit 5907d87

Browse files
committed
Remove the #externalHide field from the AnnotationLayerBuilder class
Prior to PR 20321 the annotationLayer was hidden when there was no regular annotations on the page, which meant that if there were any inferred links (from the textLayer) the annotationLayer needed to be made visible but in such a way that it wouldn't override an explicit `hide`-call from the `PDFPageView` class. With the changes in the aforementioned PR the annotationLayer is now always "visible", and this code can thus be simplified a little bit.
1 parent 19046a6 commit 5907d87

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

web/annotation_layer_builder.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ class AnnotationLayerBuilder {
7272

7373
#commentManager = null;
7474

75-
#externalHide = false;
76-
7775
#onAppend = null;
7876

7977
#eventAC = null;
@@ -226,8 +224,7 @@ class AnnotationLayerBuilder {
226224
this.#eventAC = null;
227225
}
228226

229-
hide(internal = false) {
230-
this.#externalHide = !internal;
227+
hide() {
231228
if (!this.div) {
232229
return;
233230
}
@@ -263,10 +260,6 @@ class AnnotationLayerBuilder {
263260
}
264261

265262
await this.annotationLayer.addLinkAnnotations(newLinks);
266-
// Don't show the annotation layer if it was explicitly hidden previously.
267-
if (!this.#externalHide) {
268-
this.div.hidden = false;
269-
}
270263
}
271264

272265
#updatePresentationModeState(state) {

0 commit comments

Comments
 (0)