aboutsummaryrefslogtreecommitdiff
path: root/beamer/viewer/presentation.js
diff options
context:
space:
mode:
Diffstat (limited to 'beamer/viewer/presentation.js')
-rw-r--r--beamer/viewer/presentation.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/beamer/viewer/presentation.js b/beamer/viewer/presentation.js
index fd03288..753027b 100644
--- a/beamer/viewer/presentation.js
+++ b/beamer/viewer/presentation.js
@@ -30,11 +30,11 @@ class Presentation {
30 } 30 }
31 31
32 _setupStage() { 32 _setupStage() {
33 const self = this; 33 return new Stage(
34 const onStageReadyCallback = function() { self._onStageReady(); }; 34 () => this._onStageReady(),
35 const onNextCallback = function() { self._onNext(); }; 35 () => this._onNext(),
36 const onPreviousCallback = function() { self._onPrevious(); }; 36 () => this._onPrevious(),
37 return new Stage(onStageReadyCallback, onNextCallback, onPreviousCallback); 37 );
38 } 38 }
39 39
40 _onStageReady() { 40 _onStageReady() {
@@ -52,10 +52,9 @@ class Presentation {
52 } 52 }
53 53
54 _setPage(pageIndex) { 54 _setPage(pageIndex) {
55 const self = this;
56 this.currentPageIndex = pageIndex; 55 this.currentPageIndex = pageIndex;
57 this.pdf.getPage(this.currentPageIndex).then(function(page) { 56 this.pdf
58 self.stage.setPage(page); 57 .getPage(this.currentPageIndex)
59 }) 58 .then(page => this.stage.setPage(page))
60 } 59 }
61} 60}