diff options
author | pacien | 2023-10-26 21:04:02 +0200 |
---|---|---|
committer | pacien | 2023-10-26 21:16:26 +0200 |
commit | 007c11f04a256a2e8704a9b26320e5c0e3457994 (patch) | |
tree | eb51646e2d0bbcbc5abcb81b771d94791c9ca4f2 /beamer/viewer/screen | |
parent | 89727493f6dee04e46977c4d283dd35bdfc82c6e (diff) | |
download | beamer-viewer-007c11f04a256a2e8704a9b26320e5c0e3457994.tar.gz |
treewide: use fat arrow syntax
Diffstat (limited to 'beamer/viewer/screen')
-rw-r--r-- | beamer/viewer/screen/screen.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/beamer/viewer/screen/screen.js b/beamer/viewer/screen/screen.js index c65ebc3..7cfc54b 100644 --- a/beamer/viewer/screen/screen.js +++ b/beamer/viewer/screen/screen.js | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Beamer Viewer, a web-based PDF presentation viewer | 2 | * Beamer Viewer, a web-based PDF presentation viewer |
3 | * Copyright (C) 2018 Pacien TRAN-GIRARD | 3 | * Copyright (C) 2018-2023 Pacien TRAN-GIRARD |
4 | * | 4 | * |
5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
6 | * it under the terms of the GNU Affero General Public License as | 6 | * it under the terms of the GNU Affero General Public License as |
@@ -42,10 +42,7 @@ class Screen { | |||
42 | } | 42 | } |
43 | 43 | ||
44 | _registerListeners() { | 44 | _registerListeners() { |
45 | const self = this; | 45 | this.window.addEventListener("resize", () => this._repaint()); |
46 | this.window.addEventListener("resize", function() { | ||
47 | self._repaint(); | ||
48 | }); | ||
49 | } | 46 | } |
50 | 47 | ||
51 | _hideWelcomeScreen() { | 48 | _hideWelcomeScreen() { |
@@ -91,10 +88,9 @@ class Screen { | |||
91 | viewport: this.page.getViewport(scaleFactor) | 88 | viewport: this.page.getViewport(scaleFactor) |
92 | }; | 89 | }; |
93 | 90 | ||
94 | const self = this; | 91 | this.page |
95 | this.page.render(renderContext).then(function() { | 92 | .render(renderContext) |
96 | self._showCanvas(canvas); | 93 | .then(() => this._showCanvas(canvas)); |
97 | }); | ||
98 | } | 94 | } |
99 | 95 | ||
100 | _repaint() { | 96 | _repaint() { |