ability to define autoSlide duration per slide

master
Hakim El Hattab 2012-10-13 12:04:33 -04:00
parent ed1db1f3c8
commit 421b78aafb
3 changed files with 75 additions and 74 deletions

View File

@ -76,7 +76,7 @@ Reveal.initialize({
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides
// by using a data-duration attribute on your slides
autoSlide: 0,
// Enable slide navigation via mouse wheel

View File

@ -1,5 +1,5 @@
/*!
* reveal.js 2.1 r31
* reveal.js 2.1 r32
* http://lab.hakim.se/reveal-js
* MIT licensed
*
@ -34,7 +34,7 @@ var Reveal = (function(){
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoSlide attribute on your slides
// by using a data-duration attribute on your slides
autoSlide: 0,
// Enable slide navigation via mouse wheel
@ -53,7 +53,7 @@ var Reveal = (function(){
dependencies: []
},
// stores if the next slide should be shown automatically
// Stores if the next slide should be shown automatically
// after n milliseconds
autoSlide = config.autoSlide,
@ -845,11 +845,11 @@ var Reveal = (function(){
state = state.concat( slideState.split( ' ' ) );
}
// if this slide has a autoSlide attribtue associated use this as autoSlide value
// otherwise use the global configured time
var slideAutoSlide = slides[index].getAttribute( 'data-autoslide' );
// If this slide has a data-duration attribtue associated use this as
// autoSlide value otherwise use the global configured time
var slideAutoSlide = slides[index].getAttribute( 'data-duration' );
if( slideAutoSlide ) {
autoSlide = parseInt(slideAutoSlide);
autoSlide = parseInt( slideAutoSlide );
} else {
autoSlide = config.autoSlide
}

133
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long