Merge pull request #15770 from calixteman/set_dims

Set the dimensions of the various layers at their creation
This commit is contained in:
calixteman 2022-12-11 17:32:29 +01:00 committed by GitHub
commit d9f13558d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 89 additions and 78 deletions

View file

@ -72,14 +72,14 @@ class AnnotationEditorLayerBuilder {
}
// Create an AnnotationEditor layer div
this.div = document.createElement("div");
this.div.className = "annotationEditorLayer";
this.div.tabIndex = 0;
this.pageDiv.append(this.div);
const div = (this.div = document.createElement("div"));
div.className = "annotationEditorLayer";
div.tabIndex = 0;
this.pageDiv.append(div);
this.annotationEditorLayer = new AnnotationEditorLayer({
uiManager: this.#uiManager,
div: this.div,
div,
accessibilityManager: this.accessibilityManager,
pageIndex: this.pdfPage.pageNumber - 1,
l10n: this.l10n,
@ -88,7 +88,7 @@ class AnnotationEditorLayerBuilder {
const parameters = {
viewport: clonedViewport,
div: this.div,
div,
annotations: null,
intent,
};