mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
Disable auto-sliding when printing to PDF.
This commit is contained in:
parent
8af99d0b05
commit
71215a8178
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user