Skip to content

Commit

Permalink
Merge pull request #2513 from TuurDutoit/feature/mobile-view-distance
Browse files Browse the repository at this point in the history
Add mobileViewDistance config key
  • Loading branch information
hakimel authored Dec 9, 2019
2 parents f9affb5 + 6ab72ea commit 1515ddc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1515ddc

Please sign in to comment.