Disable auto-sliding when printing to PDF.

This commit is contained in:
David Russell 2016-12-25 12:46:32 +07:00
parent 8af99d0b05
commit 71215a8178
3 changed files with 9 additions and 5 deletions

View File

@ -273,8 +273,12 @@ public class SlideshowModel {
/*
* Return "autoslide" defined in PITCHME.yaml.
*/
public int fetchAutoSlide() {
return (_yOpts != null) ? _yOpts.fetchAutoSlide(params()) : 0;
public int fetchAutoSlide(boolean printing) {
if(printing)
return 0; // Disable auto-slide when printing.
else
return (_yOpts != null) ? _yOpts.fetchAutoSlide(params()) : 0;
}
/*

View File

@ -74,7 +74,7 @@
<script src="@deps.revealjs(offline)/lib/js/head.min.js"></script>
<script src="@deps.jquery(offline)/jquery.min.js"></script>
@SlideshowReveal(ssm, deps, offline)
@SlideshowReveal(ssm, deps, printing, offline)
<script>
@if(ssm.fixedTheme()) {

View File

@ -1,4 +1,4 @@
@(ssm: com.gitpitch.models.SlideshowModel, deps: com.gitpitch.policies.Dependencies, offline: Boolean)
@(ssm: com.gitpitch.models.SlideshowModel, deps: com.gitpitch.policies.Dependencies, printing: Boolean, offline: Boolean)
<script>
Reveal.initialize({
@ -6,7 +6,7 @@
margin: 0.0,
showNotes: @ssm.showNotes(),
transition: '@ssm.fetchTransition()',
autoSlide: @ssm.fetchAutoSlide(),
autoSlide: @ssm.fetchAutoSlide(printing),
loop: @ssm.fetchLoop(),
center: @ssm.fetchVerticalCenter(),
rtl: @ssm.fetchRTL(),