new controls are used by default, add config options

This commit is contained in:
Hakim El Hattab
2016-04-29 10:06:43 +02:00
parent 8a09557699
commit a9fcaa6f9e
15 changed files with 160 additions and 575 deletions

View File

@ -52,6 +52,12 @@
// Display controls in the bottom right corner
controls: true,
// Determines where controls appear, either "bottom-right" or "edges"
controlsPlacement: 'edges',
// De-emphasizes backwards navigation controls
controlsSoftenBackArrows: true,
// Display a presentation progress bar
progress: true,
@ -998,12 +1004,8 @@
dom.controls.style.display = config.controls ? 'block' : 'none';
dom.progress.style.display = config.progress ? 'block' : 'none';
var controlsType = typeof config.controls === 'string' ? config.controls : 'bottom-right';
dom.controls.setAttribute( 'data-controls-type', controlsType );
if( typeof config.controls === 'string' ) {
dom.controls.classList.add( config.controls );
}
dom.controls.setAttribute( 'data-controls-placement', config.controlsPlacement );
dom.controls.classList.toggle( 'soften-back-arrows', config.controlsSoftenBackArrows );
if( config.shuffle ) {
shuffle();