From 007c11f04a256a2e8704a9b26320e5c0e3457994 Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 26 Oct 2023 21:04:02 +0200 Subject: treewide: use fat arrow syntax --- beamer/viewer/screen/screen.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'beamer/viewer/screen') 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 @@ /* * Beamer Viewer, a web-based PDF presentation viewer - * Copyright (C) 2018 Pacien TRAN-GIRARD + * Copyright (C) 2018-2023 Pacien TRAN-GIRARD * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -42,10 +42,7 @@ class Screen { } _registerListeners() { - const self = this; - this.window.addEventListener("resize", function() { - self._repaint(); - }); + this.window.addEventListener("resize", () => this._repaint()); } _hideWelcomeScreen() { @@ -91,10 +88,9 @@ class Screen { viewport: this.page.getViewport(scaleFactor) }; - const self = this; - this.page.render(renderContext).then(function() { - self._showCanvas(canvas); - }); + this.page + .render(renderContext) + .then(() => this._showCanvas(canvas)); } _repaint() { -- cgit v1.2.3