add getTotalSlides #858
This commit is contained in:
parent
1de159c4f4
commit
9947b7a532
11
js/reveal.js
11
js/reveal.js
|
@ -2392,6 +2392,15 @@ var Reveal = (function(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the total number of slides in this presentation.
|
||||||
|
*/
|
||||||
|
function getTotalSlides() {
|
||||||
|
|
||||||
|
return document.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the current state of the presentation as
|
* Retrieves the current state of the presentation as
|
||||||
* an object. This state can then be restored at any
|
* an object. This state can then be restored at any
|
||||||
|
@ -3457,6 +3466,8 @@ var Reveal = (function(){
|
||||||
// Returns the indices of the current, or specified, slide
|
// Returns the indices of the current, or specified, slide
|
||||||
getIndices: getIndices,
|
getIndices: getIndices,
|
||||||
|
|
||||||
|
getTotalSlides: getTotalSlides,
|
||||||
|
|
||||||
// Returns the slide at the specified index, y is optional
|
// Returns the slide at the specified index, y is optional
|
||||||
getSlide: function( x, y ) {
|
getSlide: function( x, y ) {
|
||||||
var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
|
var horizontalSlide = document.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
|
||||||
|
|
6
js/reveal.min.js
vendored
6
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user