fix issue with auto-advance (closes #273)
This commit is contained in:
1 parent
256186e259
commit
68f8c9361e
2 files changed
+5
-4
No files matched your search
+3
-2
@@ -958,7 +958,8 @@ var Reveal = (function(){
|
||||
var slideAutoSlide = slides[index].getAttribute( 'data-autoslide' );
|
||||
if( slideAutoSlide ) {
|
||||
autoSlide = parseInt( slideAutoSlide, 10 );
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
autoSlide = config.autoSlide;
|
||||
}
|
||||
|
||||
@@ -1165,7 +1166,7 @@ var Reveal = (function(){
|
||||
|
||||
// If this is a vertical slide, grab the vertical index
|
||||
if( isVertical ) {
|
||||
v = Math.max( toArray( slide.parentNode.children ).indexOf( slide ), 0 );
|
||||
v = Math.max( toArray( slide.parentNode.querySelectorAll( 'section' ) ).indexOf( slide ), 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* reveal.js 2.2 (2012-11-27, 08:44)
|
||||
* reveal.js 2.2 (2013-01-02, 09:12)
|
||||
* http://lab.hakim.se/reveal-js
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
var Reveal=function(){"use strict";function y(e){if(!h&&!c){document.body.setAttribute("class","no-transforms");return}window.addEventListener("load",P,!1),C(r,e),w(),E()}function b(){l.theme=document.querySelector("#theme"),l.wrapper=document.querySelector(".reveal"),l.slides=document.querySelector(".reveal .slides");if(!l.wrapper.querySelector(".progress")&&r.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",l.wrapper.appendChild(e)}if(!l.wrapper.querySelector(".controls")&&r.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',l.wrapper.appendChild(t)}if(!l.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),l.wrapper.appendChild(n)}if(!l.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay"),l.wrapper.appendChild(i)}l.progress=document.querySelector(".reveal .progress"),l.progressbar=document.querySelector(".reveal .progress span"),r.controls&&(l.controls=document.querySelector(".reveal .controls"),l.controlsLeft=k(document.querySelectorAll(".navigate-left")),l.controlsRight=k(document.querySelectorAll(".navigate-right")),l.controlsUp=k(document.querySelectorAll(".navigate-up")),l.controlsDown=k(document.querySelectorAll(".navigate-down")),l.controlsPrev=k(document.querySelectorAll(".navigate-prev")),l.controlsNext=k(document.querySelectorAll(".navigate-next")))}function w(){navigator.userAgent.match(/(iphone|ipod)/i)&&(document.documentElement.style.overflow="scroll",document.body.style.height="120%",window.addEventListener("load",M,!1),window.addEventListener("orientationchange",M,!1))}function E(){function o(){t.length&&head.js.apply(null,t),S()}var e=[],t=[];for(var n=0,i=r.dependencies.length;n<i;n++){var s=r.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function S(){b(),T(),x(),P(),G(),nt(),setTimeout(function(){_("ready",{indexh:s,indexv:o,currentSlide:a})},1)}function x(){c===!1&&(r.transition="linear"),r.controls&&l.controls&&(l.controls.style.display="block"),r.progress&&l.progress&&(l.progress.style.display="block"),r.transition!=="default"&&l.wrapper.classList.add(r.transition),r.rtl&&l.wrapper.classList.add("rtl"),r.center&&l.wrapper.classList.add("center"),r.mouseWheel&&(document.addEventListener("DOMMouseScroll",pt,!1),document.addEventListener("mousewheel",pt,!1)),r.rollingLinks&&D();if(r.theme&&l.theme){var e=l.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,n=e.match(t)[0];r.theme!==n&&(e=e.replace(t,r.theme),l.theme.setAttribute("href",e))}}function T(){document.addEventListener("touchstart",lt,!1),document.addEventListener("touchmove",ct,!1),document.addEventListener("touchend",ht,!1),window.addEventListener("hashchange",vt,!1),window.addEventListener("resize",mt,!1),r.keyboard&&document.addEventListener("keydown",ft,!1),r.progress&&l.progress&&l.progress.addEventListener("click",O(dt),!1);if(r.controls&&l.controls){var e="ontouchstart"in window?"touchstart":"click";l.controlsLeft.forEach(function(t){t.addEventListener(e,O(rt),!1)}),l.controlsRight.forEach(function(t){t.addEventListener(e,O(it),!1)}),l.controlsUp.forEach(function(t){t.addEventListener(e,O(st),!1)}),l.controlsDown.forEach(function(t){t.addEventListener(e,O(ot),!1)}),l.controlsPrev.forEach(function(t){t.addEventListener(e,O(ut),!1)}),l.controlsNext.forEach(function(t){t.addEventListener(e,O(at),!1)})}}function N(){document.removeEventListener("keydown",ft,!1),document.removeEventListener("touchstart",lt,!1),document.removeEventListener("touchmove",ct,!1),document.removeEventListener("touchend",ht,!1),window.removeEventListener("hashchange",vt,!1),window.removeEventListener("resize",mt,!1),r.progress&&l.progress&&l.progress.removeEventListener("click",O(dt),!1);if(r.controls&&l.controls){var e="ontouchstart"in window?"touchstart":"click";l.controlsLeft.forEach(function(t){t.removeEventListener(e,O(rt),!1)}),l.controlsRight.forEach(function(t){t.removeEventListener(e,O(it),!1)}),l.controlsUp.forEach(function(t){t.removeEventListener(e,O(st),!1)}),l.controlsDown.forEach(function(t){t.removeEventListener(e,O(ot),!1)}),l.controlsPrev.forEach(function(t){t.removeEventListener(e,O(ut),!1)}),l.controlsNext.forEach(function(t){t.removeEventListener(e,O(at),!1)})}}function C(e,t){for(var n in t)e[n]=t[n]}function k(e){return Array.prototype.slice.call(e)}function L(e,t,n){e.forEach(function(e){e[t].apply(e,n)})}function A(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function O(e){return function(t){t.preventDefault(),e.call(null,t)}}function M(){setTimeout(function(){window.scrollTo(0,1)},0)}functiLine truncated
|
||||
var Reveal=function(){"use strict";function y(e){if(!h&&!c){document.body.setAttribute("class","no-transforms");return}window.addEventListener("load",P,!1),C(r,e),w(),E()}function b(){l.theme=document.querySelector("#theme"),l.wrapper=document.querySelector(".reveal"),l.slides=document.querySelector(".reveal .slides");if(!l.wrapper.querySelector(".progress")&&r.progress){var e=document.createElement("div");e.classList.add("progress"),e.innerHTML="<span></span>",l.wrapper.appendChild(e)}if(!l.wrapper.querySelector(".controls")&&r.controls){var t=document.createElement("aside");t.classList.add("controls"),t.innerHTML='<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>',l.wrapper.appendChild(t)}if(!l.wrapper.querySelector(".state-background")){var n=document.createElement("div");n.classList.add("state-background"),l.wrapper.appendChild(n)}if(!l.wrapper.querySelector(".pause-overlay")){var i=document.createElement("div");i.classList.add("pause-overlay"),l.wrapper.appendChild(i)}l.progress=document.querySelector(".reveal .progress"),l.progressbar=document.querySelector(".reveal .progress span"),r.controls&&(l.controls=document.querySelector(".reveal .controls"),l.controlsLeft=k(document.querySelectorAll(".navigate-left")),l.controlsRight=k(document.querySelectorAll(".navigate-right")),l.controlsUp=k(document.querySelectorAll(".navigate-up")),l.controlsDown=k(document.querySelectorAll(".navigate-down")),l.controlsPrev=k(document.querySelectorAll(".navigate-prev")),l.controlsNext=k(document.querySelectorAll(".navigate-next")))}function w(){navigator.userAgent.match(/(iphone|ipod)/i)&&(document.documentElement.style.overflow="scroll",document.body.style.height="120%",window.addEventListener("load",M,!1),window.addEventListener("orientationchange",M,!1))}function E(){function o(){t.length&&head.js.apply(null,t),S()}var e=[],t=[];for(var n=0,i=r.dependencies.length;n<i;n++){var s=r.dependencies[n];if(!s.condition||s.condition())s.async?t.push(s.src):e.push(s.src),typeof s.callback=="function"&&head.ready(s.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],s.callback)}e.length?(head.ready(o),head.js.apply(null,e)):o()}function S(){b(),T(),x(),P(),G(),nt(),setTimeout(function(){_("ready",{indexh:s,indexv:o,currentSlide:a})},1)}function x(){c===!1&&(r.transition="linear"),r.controls&&l.controls&&(l.controls.style.display="block"),r.progress&&l.progress&&(l.progress.style.display="block"),r.transition!=="default"&&l.wrapper.classList.add(r.transition),r.rtl&&l.wrapper.classList.add("rtl"),r.center&&l.wrapper.classList.add("center"),r.mouseWheel&&(document.addEventListener("DOMMouseScroll",pt,!1),document.addEventListener("mousewheel",pt,!1)),r.rollingLinks&&D();if(r.theme&&l.theme){var e=l.theme.getAttribute("href"),t=/[^\/]*?(?=\.css)/,n=e.match(t)[0];r.theme!==n&&(e=e.replace(t,r.theme),l.theme.setAttribute("href",e))}}function T(){document.addEventListener("touchstart",lt,!1),document.addEventListener("touchmove",ct,!1),document.addEventListener("touchend",ht,!1),window.addEventListener("hashchange",vt,!1),window.addEventListener("resize",mt,!1),r.keyboard&&document.addEventListener("keydown",ft,!1),r.progress&&l.progress&&l.progress.addEventListener("click",O(dt),!1);if(r.controls&&l.controls){var e="ontouchstart"in window?"touchstart":"click";l.controlsLeft.forEach(function(t){t.addEventListener(e,O(rt),!1)}),l.controlsRight.forEach(function(t){t.addEventListener(e,O(it),!1)}),l.controlsUp.forEach(function(t){t.addEventListener(e,O(st),!1)}),l.controlsDown.forEach(function(t){t.addEventListener(e,O(ot),!1)}),l.controlsPrev.forEach(function(t){t.addEventListener(e,O(ut),!1)}),l.controlsNext.forEach(function(t){t.addEventListener(e,O(at),!1)})}}function N(){document.removeEventListener("keydown",ft,!1),document.removeEventListener("touchstart",lt,!1),document.removeEventListener("touchmove",ct,!1),document.removeEventListener("touchend",ht,!1),window.removeEventListener("hashchange",vt,!1),window.removeEventListener("resize",mt,!1),r.progress&&l.progress&&l.progress.removeEventListener("click",O(dt),!1);if(r.controls&&l.controls){var e="ontouchstart"in window?"touchstart":"click";l.controlsLeft.forEach(function(t){t.removeEventListener(e,O(rt),!1)}),l.controlsRight.forEach(function(t){t.removeEventListener(e,O(it),!1)}),l.controlsUp.forEach(function(t){t.removeEventListener(e,O(st),!1)}),l.controlsDown.forEach(function(t){t.removeEventListener(e,O(ot),!1)}),l.controlsPrev.forEach(function(t){t.removeEventListener(e,O(ut),!1)}),l.controlsNext.forEach(function(t){t.removeEventListener(e,O(at),!1)})}}function C(e,t){for(var n in t)e[n]=t[n]}function k(e){return Array.prototype.slice.call(e)}function L(e,t,n){e.forEach(function(e){e[t].apply(e,n)})}function A(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function O(e){return function(t){t.preventDefault(),e.call(null,t)}}function M(){setTimeout(function(){window.scrollTo(0,1)},0)}functiLine truncated
|
||||
Reference in new issue
Block a user