diff options
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/reveal.js b/js/reveal.js index 8d48814..a0b88ce 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -73,6 +73,9 @@ var Reveal = (function(){ // Transition style transition: 'default', // default/cube/page/concave/zoom/linear/fade/none + // Transition speed + transitionSpeed: 'default', // default/fast/slow + // Script dependencies to load dependencies: [] }, @@ -340,6 +343,8 @@ var Reveal = (function(){ dom.wrapper.classList.add( config.transition ); + dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed ); + if( dom.controls ) { dom.controls.style.display = ( config.controls && dom.controls ) ? 'block' : 'none'; } @@ -2045,6 +2050,17 @@ var Reveal = (function(){ return config; }, + // Returns an index (1-based) of the current fragment + getCurrentFragmentIndex : function() { + if( currentSlide ) { + var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' ); + + if( visibleFragments.length ) { + return visibleFragments.length; + } + } + }, + // Helper method, retrieves query string as a key/value hash getQueryHash: function() { var query = {}; |