fix bug that caused vertical stacks to shift unexpectedly in overview (closes #122)

This commit is contained in:
Hakim El Hattab 2012-08-17 00:40:12 -04:00
parent efc020c999
commit 5bd5ac67a4
3 changed files with 5 additions and 4 deletions

View file

@ -259,6 +259,7 @@ body {
} }
.reveal .controls a { .reveal .controls a {
font-family: Arial;
font-size: 0.83em; font-size: 0.83em;
position: absolute; position: absolute;
opacity: 0.1; opacity: 0.1;

View file

@ -1,5 +1,5 @@
/*! /*!
* reveal.js 2.0 r18 * reveal.js 2.0 r19
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
@ -544,7 +544,7 @@ var Reveal = (function(){
for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) { for( var j = 0, len2 = verticalSlides.length; j < len2; j++ ) {
var vslide = verticalSlides[j], var vslide = verticalSlides[j],
vtransform = 'translate(0%, ' + ( ( j - indexv ) * 105 ) + '%)'; vtransform = 'translate(0%, ' + ( ( j - ( i === indexh ? indexv : 0 ) ) * 105 ) + '%)';
vslide.setAttribute( 'data-index-h', i ); vslide.setAttribute( 'data-index-h', i );
vslide.setAttribute( 'data-index-v', j ); vslide.setAttribute( 'data-index-v', j );

4
js/reveal.min.js vendored
View file

@ -1,5 +1,5 @@
/*! /*!
* reveal.js 2.0 r18 * reveal.js 2.0 r19
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
@ -35,7 +35,7 @@ for(var af=0,ad=ae.length;af<ad;af++){var ag=ae[af];if(ag.textContent&&!ag.query
ag.innerHTML='<span data-title="'+ag.text+'">'+ag.innerHTML+"</span>";}}}}function G(){d.wrapper.classList.add("overview");var ad=Array.prototype.slice.call(document.querySelectorAll(k)); ag.innerHTML='<span data-title="'+ag.text+'">'+ag.innerHTML+"</span>";}}}}function G(){d.wrapper.classList.add("overview");var ad=Array.prototype.slice.call(document.querySelectorAll(k));
for(var ai=0,ag=ad.length;ai<ag;ai++){var af=ad[ai],am="translateZ(-2500px) translate("+((ai-l)*105)+"%, 0%)";af.setAttribute("data-index-h",ai);af.style.display="block"; for(var ai=0,ag=ad.length;ai<ag;ai++){var af=ad[ai],am="translateZ(-2500px) translate("+((ai-l)*105)+"%, 0%)";af.setAttribute("data-index-h",ai);af.style.display="block";
af.style.WebkitTransform=am;af.style.MozTransform=am;af.style.msTransform=am;af.style.OTransform=am;af.style.transform=am;if(!af.classList.contains("stack")){af.addEventListener("click",A,true); af.style.WebkitTransform=am;af.style.MozTransform=am;af.style.msTransform=am;af.style.OTransform=am;af.style.transform=am;if(!af.classList.contains("stack")){af.addEventListener("click",A,true);
}var al=Array.prototype.slice.call(af.querySelectorAll("section"));for(var ah=0,ae=al.length;ah<ae;ah++){var ak=al[ah],aj="translate(0%, "+((ah-c)*105)+"%)"; }var al=Array.prototype.slice.call(af.querySelectorAll("section"));for(var ah=0,ae=al.length;ah<ae;ah++){var ak=al[ah],aj="translate(0%, "+((ah-(ai===l?c:0))*105)+"%)";
ak.setAttribute("data-index-h",ai);ak.setAttribute("data-index-v",ah);ak.style.display="block";ak.style.WebkitTransform=aj;ak.style.MozTransform=aj;ak.style.msTransform=aj; ak.setAttribute("data-index-h",ai);ak.setAttribute("data-index-v",ah);ak.style.display="block";ak.style.WebkitTransform=aj;ak.style.MozTransform=aj;ak.style.msTransform=aj;
ak.style.OTransform=aj;ak.style.transform=aj;ak.addEventListener("click",A,true);}}}function Y(){d.wrapper.classList.remove("overview");var ag=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section")); ak.style.OTransform=aj;ak.style.transform=aj;ak.addEventListener("click",A,true);}}}function Y(){d.wrapper.classList.remove("overview");var ag=Array.prototype.slice.call(document.querySelectorAll(".reveal .slides section"));
for(var af=0,ad=ag.length;af<ad;af++){var ae=ag[af];ae.style.WebkitTransform="";ae.style.MozTransform="";ae.style.msTransform="";ae.style.OTransform=""; for(var af=0,ad=ag.length;af<ad;af++){var ae=ag[af];ae.style.WebkitTransform="";ae.style.MozTransform="";ae.style.msTransform="";ae.style.OTransform="";