ie9 fixes, including new classList polyfill

This commit is contained in:
hakimel 2012-05-03 12:42:53 -04:00
parent 5a6837358b
commit ebb834f4b0
5 changed files with 13 additions and 13 deletions

View File

@ -2,7 +2,7 @@
A CSS 3D slideshow tool for quickly creating good looking HTML presentations. Doesn't _rely_ on any external libraries but [highlight.js](http://softwaremaniacs.org/soft/highlight/en/description/) is included by default for code highlighting. A CSS 3D slideshow tool for quickly creating good looking HTML presentations. Doesn't _rely_ on any external libraries but [highlight.js](http://softwaremaniacs.org/soft/highlight/en/description/) is included by default for code highlighting.
Note that this requires a browser with support for CSS 3D transforms and ``classList``. If CSS 3D support is not detected, the presentation will degrade to less exciting 2D transitions. A [classList polyfill](https://github.com/remy/polyfills/blob/master/classList.js) from [@remy](https://github.com/remy) is also incuded to make this work in < iOS 5, < Safari 5.1 and IE. Note that this requires a browser with support for CSS 3D transforms and ``classList``. If CSS 3D support is not detected, the presentation will degrade to less exciting 2D transitions. A [classList polyfill](http://purl.eligrey.com/github/classList.js/blob/master/classList.js) is incuded to make this work in < iOS 5, < Safari 5.1 and IE.
Curious about how it looks in action? [Check out the demo page](http://lab.hakim.se/reveal-js/). Curious about how it looks in action? [Check out the demo page](http://lab.hakim.se/reveal-js/).

File diff suppressed because one or more lines are too long

View File

@ -461,7 +461,7 @@ var Reveal = (function(){
// If this slide has a state associated with it, add it // If this slide has a state associated with it, add it
// onto the current state of the deck // onto the current state of the deck
var slideState = slides[index].dataset.state; var slideState = slides[index].getAttribute( 'data-state' );
if( slideState ) { if( slideState ) {
state = state.concat( slideState.split( ' ' ) ); state = state.concat( slideState.split( ' ' ) );
} }

4
js/reveal.min.js vendored
View File

@ -31,8 +31,8 @@ N.style.MozTransform="";N.style.msTransform="";N.style.OTransform="";N.style.tra
}function x(M){if(H()){M.preventDefault();I();j=this.getAttribute("data-index-h");c=this.getAttribute("data-index-v");b();}}function L(N,P){var R=Array.prototype.slice.call(document.querySelectorAll(N)),S=R.length; }function x(M){if(H()){M.preventDefault();I();j=this.getAttribute("data-index-h");c=this.getAttribute("data-index-v");b();}}function L(N,P){var R=Array.prototype.slice.call(document.querySelectorAll(N)),S=R.length;
if(S){if(E.loop){P%=S;if(P<0){P=S+P;}}P=Math.max(Math.min(P,S-1),0);for(var Q=0;Q<S;Q++){var M=R[Q];if(H()===false){var T=Math.abs((P-Q)%(S-3))||0;M.style.display=T>3?"none":"block"; if(S){if(E.loop){P%=S;if(P<0){P=S+P;}}P=Math.max(Math.min(P,S-1),0);for(var Q=0;Q<S;Q++){var M=R[Q];if(H()===false){var T=Math.abs((P-Q)%(S-3))||0;M.style.display=T>3?"none":"block";
}R[Q].classList.remove("past");R[Q].classList.remove("present");R[Q].classList.remove("future");if(Q<P){R[Q].classList.add("past");}else{if(Q>P){R[Q].classList.add("future"); }R[Q].classList.remove("past");R[Q].classList.remove("present");R[Q].classList.remove("future");if(Q<P){R[Q].classList.add("past");}else{if(Q>P){R[Q].classList.add("future");
}}if(M.querySelector("section")){R[Q].classList.add("stack");}}R[P].classList.add("present");var O=R[P].dataset.state;if(O){K=K.concat(O.split(" "));}}else{P=0; }}if(M.querySelector("section")){R[Q].classList.add("stack");}}R[P].classList.add("present");var O=R[P].getAttribute("data-state");if(O){K=K.concat(O.split(" "));
}return P;}function b(){var Q=K.concat();K.length=0;j=L(i,j);c=L(a,c);stateLoop:for(var O=0,M=K.length;O<M;O++){for(var N=0;N<Q.length;N++){if(Q[N]===K[O]){Q.splice(N,1); }}else{P=0;}return P;}function b(){var Q=K.concat();K.length=0;j=L(i,j);c=L(a,c);stateLoop:for(var O=0,M=K.length;O<M;O++){for(var N=0;N<Q.length;N++){if(Q[N]===K[O]){Q.splice(N,1);
continue stateLoop;}}document.documentElement.classList.add(K[O]);var P=document.createEvent("HTMLEvents");P.initEvent(K[O],true,true);document.dispatchEvent(P); continue stateLoop;}}document.documentElement.classList.add(K[O]);var P=document.createEvent("HTMLEvents");P.initEvent(K[O],true,true);document.dispatchEvent(P);
}while(Q.length){document.documentElement.classList.remove(Q.pop());}if(E.progress){d.progressbar.style.width=(j/(document.querySelectorAll(i).length-1))*window.innerWidth+"px"; }while(Q.length){document.documentElement.classList.remove(Q.pop());}if(E.progress){d.progressbar.style.width=(j/(document.querySelectorAll(i).length-1))*window.innerWidth+"px";
}if(H()){z();}n();clearTimeout(w);w=setTimeout(f,1500);}function n(){var M=e();[d.controlsLeft,d.controlsRight,d.controlsUp,d.controlsDown].forEach(function(N){N.classList.remove("enabled"); }if(H()){z();}n();clearTimeout(w);w=setTimeout(f,1500);}function n(){var M=e();[d.controlsLeft,d.controlsRight,d.controlsUp,d.controlsDown].forEach(function(N){N.classList.remove("enabled");

File diff suppressed because one or more lines are too long