mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-07 17:05:38 +02:00
Shorten the code that inits AnnotationEditorLayerBuilder
in the web/pdf_page_view.js
file
This code can now utilize logical OR assignment, which is ever so slightly shorter.
This commit is contained in:
parent
f6216df889
commit
044f1c9e07
1 changed files with 12 additions and 15 deletions
|
@ -1078,15 +1078,13 @@ class PDFPageView {
|
|||
if (!annotationEditorUIManager) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.drawLayer ||= new DrawLayerBuilder({
|
||||
pageIndex: this.id,
|
||||
});
|
||||
await this.#renderDrawLayer();
|
||||
this.drawLayer.setParent(canvasWrapper);
|
||||
|
||||
if (!this.annotationEditorLayer) {
|
||||
this.annotationEditorLayer = new AnnotationEditorLayerBuilder({
|
||||
this.annotationEditorLayer ||= new AnnotationEditorLayerBuilder({
|
||||
uiManager: annotationEditorUIManager,
|
||||
pdfPage,
|
||||
l10n,
|
||||
|
@ -1098,7 +1096,6 @@ class PDFPageView {
|
|||
this.#addLayer(annotationEditorLayerDiv, "annotationEditorLayer");
|
||||
},
|
||||
});
|
||||
}
|
||||
this.#renderAnnotationEditorLayer();
|
||||
},
|
||||
error => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue