Added support for new remote-control PITCHME.yaml property.

This commit is contained in:
David Russell 2017-05-25 08:38:09 +07:00
parent 3b948a3f9a
commit 15a9a95369
3 changed files with 23 additions and 0 deletions

View File

@ -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.
*/

View File

@ -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";

View File

@ -75,3 +75,14 @@
};
</script>
@if(ssm.remoteControlEnabled()) {
<script>
Reveal.configure({
keyboard: {
37: 'prev',
39: 'next'
}
});
</script>
}