summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTuur Dutoit2019-10-18 13:37:16 +0200
committerTuur Dutoit2019-10-18 13:37:16 +0200
commit6ab72eae5150bdad00f80775877d0d49b2771bad (patch)
treea295665340026906ff6f02f3cd1a977d78dae512
parent33bed47daca3f08c396215415e6ece005970734a (diff)
Add mobileViewDistance config key
-rw-r--r--js/reveal.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 5c026db..17aabdf 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',
@@ -3257,7 +3261,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