Set the dimensions of the various layers at their creation

- Use a unique helper function in display/display_utils.js;
- Move those dimensions in css' side.
This commit is contained in:
Calixte Denizet 2022-11-21 18:48:37 +01:00
parent 9d4aadbf7a
commit a989b5a879
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,
};