From 6b6c87db976d70d8080327197e5f00ace64c75bf Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 5 May 2013 18:40:08 -0400 Subject: add data-start-indexv #427 --- js/reveal.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index a4a71db..c985f79 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -748,7 +748,10 @@ var Reveal = (function(){ function getPreviousVerticalIndex( stack ) { if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) { - return parseInt( stack.getAttribute( 'data-previous-indexv' ) || 0, 10 ); + // Prefer manually defined start-indexv + var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previous-indexv'; + + return parseInt( stack.getAttribute( attributeName ) || 0, 10 ); } return 0; -- cgit v1.2.3