diff options
author | Hakim El Hattab | 2019-12-09 21:00:58 +0100 |
---|---|---|
committer | GitHub | 2019-12-09 21:00:58 +0100 |
commit | 1515ddcf87076e2ce123c8d8cad415c5f8c0e85d (patch) | |
tree | d6f2c5aaa18f43ceefdbdb9970a1011dcba46853 | |
parent | f9affb550ac49424c745eb8116c419f5d1ab3278 (diff) | |
parent | 6ab72eae5150bdad00f80775877d0d49b2771bad (diff) |
Merge pull request #2513 from TuurDutoit/feature/mobile-view-distance
Add mobileViewDistance config key
-rw-r--r-- | js/reveal.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js index 9cb2f48..75e3c68 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -270,6 +270,10 @@ // Number of slides away from the current that are visible viewDistance: 3, + // Number of slides away from the current that are visible on mobile devices + // It is advisable to set this to a lower number than viewDistance in order to save resources + mobileViewDistance: 2, + // The display mode that will be used to show slides display: 'block', @@ -3286,7 +3290,7 @@ // Limit view distance on weaker devices if( isMobileDevice ) { - viewDistance = isOverview() ? 6 : 2; + viewDistance = isOverview() ? 6 : config.mobileViewDistance; } // All slides need to be visible when exporting to PDF |