Skip to content

Commit

Permalink
Merge pull request hakimel#2513 from TuurDutoit/feature/mobile-view-d…
Browse files Browse the repository at this point in the history
…istance

Add mobileViewDistance config key
  • Loading branch information
hakimel authored Dec 9, 2019
2 parents 5e25c37 + 99d9563 commit ef37a5c
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 ef37a5c

Please sign in to comment.