mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
Added support for new remote-control PITCHME.yaml property.
This commit is contained in:
parent
3b948a3f9a
commit
15a9a95369
|
@ -296,6 +296,13 @@ public class SlideshowModel {
|
|||
return (_yOpts != null) ? _yOpts.fetchLoop(params()) : false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return "remote-control" defined in PITCHME.yaml.
|
||||
*/
|
||||
public boolean remoteControlEnabled() {
|
||||
return (_yOpts != null) ? _yOpts.fetchRemoteControl(params()) : false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return "rtl" defined in PITCHME.yaml.
|
||||
*/
|
||||
|
|
|
@ -195,6 +195,10 @@ public final class YAMLOptions {
|
|||
return fetchBooleanOption(pp, LOOP_OPTION);
|
||||
}
|
||||
|
||||
public Boolean fetchRemoteControl(PitchParams pp) {
|
||||
return fetchBooleanOption(pp, REMOTE_CONTROL_OPTION);
|
||||
}
|
||||
|
||||
public Boolean fetchRTL(PitchParams pp) {
|
||||
return fetchBooleanOption(pp, RTL_OPTION);
|
||||
}
|
||||
|
@ -352,6 +356,7 @@ public final class YAMLOptions {
|
|||
private static final String TRANSITION_OPTION = "transition";
|
||||
private static final String AUTOSLIDE_OPTION = "autoslide";
|
||||
private static final String LOOP_OPTION = "loop";
|
||||
private static final String REMOTE_CONTROL_OPTION = "remote-control";
|
||||
private static final String RTL_OPTION = "rtl";
|
||||
private static final String SHUFFLE_OPTION = "shuffle";
|
||||
private static final String MOUSE_WHEEL_OPTION = "mousewheel";
|
||||
|
|
|
@ -75,3 +75,14 @@
|
|||
};
|
||||
|
||||
</script>
|
||||
|
||||
@if(ssm.remoteControlEnabled()) {
|
||||
<script>
|
||||
Reveal.configure({
|
||||
keyboard: {
|
||||
37: 'prev',
|
||||
39: 'next'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user