summaryrefslogtreecommitdiffstats
path: root/zalmy.ts
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2014-05-17 23:17:46 +0200
committerMatěj Cepl <mcepl@redhat.com>2014-05-17 23:18:49 +0200
commit2f320e070bab17935b9977c008bf3d81c43c6848 (patch)
tree9f881c921b1ac955da2c8df92a114419e25f1805 /zalmy.ts
parent461ba3e6e6eba4fb1e05b61959939c854efc37c0 (diff)
downloadzalmy-2f320e070bab17935b9977c008bf3d81c43c6848.tar.gz
Switch scrolling and switching page to avoid blinking.
Fixes #324
Diffstat (limited to 'zalmy.ts')
-rw-r--r--zalmy.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/zalmy.ts b/zalmy.ts
index ba01366..3bfc5f6 100644
--- a/zalmy.ts
+++ b/zalmy.ts
@@ -60,9 +60,10 @@ export class Psalm extends ap.ActivePage {
*/
display(disp_no: number = this.cur_psalm) {
console.log("cur_psalm = " + disp_no);
+ // first scroll then switch to avoid blinking of the page
+ window.scroll(0, 0);
document.getElementById("Ps." + disp_no).parentElement.
classList.add('visible');
- window.scroll(0, 0);
}
/**