aboutsummaryrefslogtreecommitdiff
path: root/pointless/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'pointless/viewer')
-rw-r--r--pointless/viewer/screen.js11
-rw-r--r--pointless/viewer/viewer.css4
2 files changed, 14 insertions, 1 deletions
diff --git a/pointless/viewer/screen.js b/pointless/viewer/screen.js
index 28f4f55..42ea781 100644
--- a/pointless/viewer/screen.js
+++ b/pointless/viewer/screen.js
@@ -29,7 +29,7 @@ class Screen {
29 this.timer.start(); 29 this.timer.start();
30 30
31 this.page = page; 31 this.page = page;
32 this._refreshPage(); 32 this._changePage();
33 this.pageTurnCount++; 33 this.pageTurnCount++;
34 } 34 }
35 35
@@ -69,6 +69,15 @@ class Screen {
69 }); 69 });
70 } 70 }
71 71
72 _changePage() {
73 this.canvas.style.opacity = 0;
74 var self = this;
75 setTimeout(function() {
76 self._refreshPage();
77 self.canvas.style.opacity = 1;
78 }, 300);
79 }
80
72 _refreshPage() { 81 _refreshPage() {
73 if (this.page == null) return; 82 if (this.page == null) return;
74 var viewport = this.page.getViewport(1); 83 var viewport = this.page.getViewport(1);
diff --git a/pointless/viewer/viewer.css b/pointless/viewer/viewer.css
index d5b766b..8ec608f 100644
--- a/pointless/viewer/viewer.css
+++ b/pointless/viewer/viewer.css
@@ -91,3 +91,7 @@ header span {
91.notification:empty { 91.notification:empty {
92 display: none; 92 display: none;
93} 93}
94
95#screen {
96 transition: opacity 300ms;
97}