Merge pull request #18672 from Snuffleupagus/PDFPageView-AnnotationEditorLayerBuilder-shorter-init
Shorten the code that inits `AnnotationEditorLayerBuilder` in the `web/pdf_page_view.js` file
This commit is contained in:
commit
bde7a84e09
@ -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…
x
Reference in New Issue
Block a user