Re-factor the OverlayManager class to use a WeakMap internally

This way we're able to store the `<dialog>` elements directly, which removes the need to use manually specified name-strings thus simplifying both the `OverlayManager` itself and its calling code.
This commit is contained in:
Jonas Jenwald 2022-03-25 14:10:22 +01:00
parent f0aa08b464
commit 923bd52cdb
6 changed files with 48 additions and 66 deletions

View file

@ -161,7 +161,6 @@ function getViewerConfiguration() {
findNextButton: document.getElementById("findNext"),
},
passwordOverlay: {
dialogName: "passwordDialog",
dialog: document.getElementById("passwordDialog"),
label: document.getElementById("passwordText"),
input: document.getElementById("password"),
@ -169,7 +168,6 @@ function getViewerConfiguration() {
cancelButton: document.getElementById("passwordCancel"),
},
documentProperties: {
dialogName: "documentPropertiesDialog",
dialog: document.getElementById("documentPropertiesDialog"),
closeButton: document.getElementById("documentPropertiesClose"),
fields: {