aboutsummaryrefslogtreecommitdiff
path: root/beamer/viewer
diff options
context:
space:
mode:
authorpacien2023-10-23 23:40:53 +0200
committerpacien2023-10-23 23:40:53 +0200
commitb1161cee7cb0599c64fd85528d74e664329a4286 (patch)
tree5181abd102ac9bd639088985bd7f6c40b2e51fe5 /beamer/viewer
parent0f7daaa9b59e400f77969515aec63d4dfca036d9 (diff)
downloadbeamer-viewer-b1161cee7cb0599c64fd85528d74e664329a4286.tar.gz
startscreen: lock UI until all scripts are loaded and ready
Diffstat (limited to 'beamer/viewer')
-rw-r--r--beamer/viewer/viewer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/beamer/viewer/viewer.js b/beamer/viewer/viewer.js
index e9c6d65..a614c88 100644
--- a/beamer/viewer/viewer.js
+++ b/beamer/viewer/viewer.js
@@ -26,9 +26,14 @@ class Viewer {
26 this.fileReader = new FileReader(); 26 this.fileReader = new FileReader();
27 this.presentation = null; 27 this.presentation = null;
28 28
29 document.addEventListener("DOMContentLoaded", () => this._unlockUi());
29 this._listenForInput(); 30 this._listenForInput();
30 } 31 }
31 32
33 _unlockUi() {
34 this.fileInput.disabled = false;
35 }
36
32 _preparePresentation(source) { 37 _preparePresentation(source) {
33 const self = this; 38 const self = this;
34 pdfjsLib.getDocument(source).then(function(pdf) { 39 pdfjsLib.getDocument(source).then(function(pdf) {