test isAutoSliding, isAutoSliding returns false when no autoSlide value is set #766
This commit is contained in:
parent
137ddf5472
commit
ed4cdaf9e7
|
@ -1471,7 +1471,7 @@ var Reveal = (function(){
|
||||||
*/
|
*/
|
||||||
function isAutoSliding() {
|
function isAutoSliding() {
|
||||||
|
|
||||||
return !autoSlidePaused;
|
return !!( autoSlide && !autoSlidePaused );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
10
test/test.js
10
test/test.js
|
@ -57,6 +57,16 @@ Reveal.addEventListener( 'ready', function() {
|
||||||
strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
strictEqual( Reveal.isPaused(), false, 'false after resuming' );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test( 'Reveal.isAutoSliding', function() {
|
||||||
|
strictEqual( Reveal.isAutoSliding(), false, 'false by default' );
|
||||||
|
|
||||||
|
Reveal.configure({ autoSlide: 10000 });
|
||||||
|
strictEqual( Reveal.isAutoSliding(), true, 'true after starting' );
|
||||||
|
|
||||||
|
Reveal.configure({ autoSlide: 0 });
|
||||||
|
strictEqual( Reveal.isAutoSliding(), false, 'false after setting to 0' );
|
||||||
|
});
|
||||||
|
|
||||||
test( 'Reveal.isFirstSlide', function() {
|
test( 'Reveal.isFirstSlide', function() {
|
||||||
Reveal.slide( 0, 0 );
|
Reveal.slide( 0, 0 );
|
||||||
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
strictEqual( Reveal.isFirstSlide(), true, 'true after Reveal.slide( 0, 0 )' );
|
||||||
|
|
Loading…
Reference in New Issue