Skip to content

Commit

Permalink
Merge pull request #5 from tomcartwrightuk/master
Browse files Browse the repository at this point in the history
Add option to limit pageturns if preserve3d isn't present
  • Loading branch information
djgrant committed Jul 21, 2015
2 parents 317f1ec + e7f3231 commit c0ec98c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/heidelberg/heidelberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
canClose: false,
arrowKeys: true,
concurrentAnimations: null,
limitPageTurns: true,
onPageTurn: function() {},
onSpreadSetup: function() {}
};
Expand Down Expand Up @@ -150,7 +151,7 @@
els.children = $('.Heidelberg-Page, .Heidelberg-HiddenCover', el);

var maxAnimations = options.concurrentAnimations && els.pagesAnimating.length > options.concurrentAnimations;
var maxAnimationsBrowser = !Modernizr.preserve3d && els.pagesAnimating.length > 2;
var maxAnimationsBrowser = !Modernizr.preserve3d && els.pagesAnimating.length > 2 && options.limitPageTurns;

if(maxAnimations || maxAnimationsBrowser) {
return;
Expand Down

0 comments on commit c0ec98c

Please sign in to comment.