support moz and webkit prefixed requestAnimationFrame
This commit is contained in:
1 parent
6aaf88aae7
commit
29c5af84be
2 files changed
+7
-6
No files matched your search
+5
-4
@@ -221,7 +221,8 @@ var Reveal = (function(){
|
||||
'OTransform' in document.body.style ||
|
||||
'transform' in document.body.style;
|
||||
|
||||
features.requestAnimationFrame = typeof window.requestAnimationFrame === 'function';
|
||||
features.requestAnimationFrameMethod = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
||||
features.requestAnimationFrame = typeof features.requestAnimationFrameMethod === 'function';
|
||||
|
||||
features.canvas = !!document.createElement( 'canvas' ).getContext;
|
||||
|
||||
@@ -2866,7 +2867,7 @@ var Reveal = (function(){
|
||||
this.render();
|
||||
|
||||
if( this.playing ) {
|
||||
window.requestAnimationFrame( this.animate.bind( this ) );
|
||||
features.requestAnimationFrameMethod.call( window, this.animate.bind( this ) );
|
||||
}
|
||||
|
||||
};
|
||||
@@ -2890,8 +2891,8 @@ var Reveal = (function(){
|
||||
|
||||
// Solid background color
|
||||
this.context.beginPath();
|
||||
this.context.arc( x, y, radius, 0, Math.PI * 2, false );
|
||||
this.context.fillStyle = 'rgba(0,0,0,0.2)';
|
||||
this.context.arc( x, y, radius + 2, 0, Math.PI * 2, false );
|
||||
this.context.fillStyle = 'rgba( 0, 0, 0, 0.4 )';
|
||||
this.context.fill();
|
||||
|
||||
// Draw progress track
|
||||
|
||||
Vendored
+2
-2
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* reveal.js 2.6.0-dev (2013-10-13, 15:05)
|
||||
* reveal.js 2.6.0-dev (2013-10-13, 15:24)
|
||||
* http://lab.hakim.se/reveal-js
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
var Reveal=function(){"use strict";function a(a){return b(),$b.transforms2d||$b.transforms3d?(window.addEventListener("load",C,!1),l(Vb,a),l(Vb,Reveal.getQueryHash()),s(),c(),void 0):(document.body.setAttribute("class","no-transforms"),void 0)}function b(){$b.transforms3d="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,$b.transforms2d="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,$b.requestAnimationFrame="function"==typeof window.requestAnimationFrame,$b.canvas=!!document.createElement("canvas").getContext,Pb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){c.length&&head.js.apply(null,c),d()}for(var b=[],c=[],e=0,f=Vb.dependencies.length;f>e;e++){var g=Vb.dependencies[e];(!g.condition||g.condition())&&(g.async?c.push(g.src):b.push(g.src),"function"==typeof g.callback&&head.ready(g.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],g.callback))}b.length?(head.ready(a),head.js.apply(null,b)):a()}function d(){f(),e(),i(),ab(),setTimeout(function(){Zb.slides.classList.remove("no-transition"),Wb=!0,u("ready",{indexh:Lb,indexv:Mb,currentSlide:Ob})},1)}function e(){var a=m(document.querySelectorAll(Sb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a,b){b>0&&a.classList.add("future")})})}function f(){Zb.theme=document.querySelector("#theme"),Zb.wrapper=document.querySelector(".reveal"),Zb.slides=document.querySelector(".reveal .slides"),Zb.slides.classList.add("no-transition"),Zb.background=g(Zb.wrapper,"div","backgrounds",null),Zb.progress=g(Zb.wrapper,"div","progress","<span></span>"),Zb.progressbar=Zb.progress.querySelector("span"),g(Zb.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),g(Zb.wrapper,"div","state-background",null),g(Zb.wrapper,"div","pause-overlay",null),Zb.controls=document.querySelector(".reveal .controls"),Zb.controlsLeft=m(document.querySelectorAll(".navigate-left")),Zb.controlsRight=m(document.querySelectorAll(".navigate-right")),Zb.controlsUp=m(document.querySelectorAll(".navigate-up")),Zb.controlsDown=m(document.querySelectorAll(".navigate-down")),Zb.controlsPrev=m(document.querySelectorAll(".navigate-prev")),Zb.controlsNext=m(document.querySelectorAll(".navigate-next"))}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),Zb.background.innerHTML="",Zb.background.classList.add("no-transition"),m(document.querySelectorAll(Sb)).forEach(function(b){var c;c=r()?a(b,b):a(b,Zb.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),Vb.parallaxBackgroundImage?(Zb.background.style.backgroundImage='url("'+Vb.parallaxBackgroundImage+'")',Zb.background.style.backgroundSize=Vb.parallaxBackgroundSize,setTimeout(function(){Zb.wrapper.classList.add("has-parallax-background")},1)):(Zb.background.style.backgroundImage="",Zb.wrapper.classList.remove("has-parallax-background"))}function i(a){if(Zb.wrapper.classList.remove(Vb.transition),"object"==typeof a&&l(Vb,a),$b.transforms3d===!1&&(Vb.transition="linear"),Zb.wrapper.classList.add(Vb.transition),Zb.wrapper.setAttribute("data-transition-speed",Vb.transitionSpeed),Zb.wrapper.setAttribute("data-background-transition",Vb.backgroundTransition),Zb.controls.style.display=Vb.controls?"block":"none",Zb.progress.style.display=Vb.progress?"block":"none",Vb.rtl?Zb.wrapper.classList.add("rtl"):Zb.wrapper.classList.removeLine truncated
|
||||
var Reveal=function(){"use strict";function a(a){return b(),$b.transforms2d||$b.transforms3d?(window.addEventListener("load",C,!1),l(Vb,a),l(Vb,Reveal.getQueryHash()),s(),c(),void 0):(document.body.setAttribute("class","no-transforms"),void 0)}function b(){$b.transforms3d="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,$b.transforms2d="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,$b.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,$b.requestAnimationFrame="function"==typeof $b.requestAnimationFrameMethod,$b.canvas=!!document.createElement("canvas").getContext,Pb=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function c(){function a(){c.length&&head.js.apply(null,c),d()}for(var b=[],c=[],e=0,f=Vb.dependencies.length;f>e;e++){var g=Vb.dependencies[e];(!g.condition||g.condition())&&(g.async?c.push(g.src):b.push(g.src),"function"==typeof g.callback&&head.ready(g.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],g.callback))}b.length?(head.ready(a),head.js.apply(null,b)):a()}function d(){f(),e(),i(),ab(),setTimeout(function(){Zb.slides.classList.remove("no-transition"),Wb=!0,u("ready",{indexh:Lb,indexv:Mb,currentSlide:Ob})},1)}function e(){var a=m(document.querySelectorAll(Sb));a.forEach(function(a){var b=m(a.querySelectorAll("section"));b.forEach(function(a,b){b>0&&a.classList.add("future")})})}function f(){Zb.theme=document.querySelector("#theme"),Zb.wrapper=document.querySelector(".reveal"),Zb.slides=document.querySelector(".reveal .slides"),Zb.slides.classList.add("no-transition"),Zb.background=g(Zb.wrapper,"div","backgrounds",null),Zb.progress=g(Zb.wrapper,"div","progress","<span></span>"),Zb.progressbar=Zb.progress.querySelector("span"),g(Zb.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),g(Zb.wrapper,"div","state-background",null),g(Zb.wrapper,"div","pause-overlay",null),Zb.controls=document.querySelector(".reveal .controls"),Zb.controlsLeft=m(document.querySelectorAll(".navigate-left")),Zb.controlsRight=m(document.querySelectorAll(".navigate-right")),Zb.controlsUp=m(document.querySelectorAll(".navigate-up")),Zb.controlsDown=m(document.querySelectorAll(".navigate-down")),Zb.controlsPrev=m(document.querySelectorAll(".navigate-prev")),Zb.controlsNext=m(document.querySelectorAll(".navigate-next"))}function g(a,b,c,d){var e=a.querySelector("."+c);return e||(e=document.createElement(b),e.classList.add(c),null!==d&&(e.innerHTML=d),a.appendChild(e)),e}function h(){function a(a,b){var c={background:a.getAttribute("data-background"),backgroundSize:a.getAttribute("data-background-size"),backgroundImage:a.getAttribute("data-background-image"),backgroundColor:a.getAttribute("data-background-color"),backgroundRepeat:a.getAttribute("data-background-repeat"),backgroundPosition:a.getAttribute("data-background-position"),backgroundTransition:a.getAttribute("data-background-transition")},d=document.createElement("div");return d.className="slide-background",c.background&&(/^(http|file|\/\/)/gi.test(c.background)||/\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test(c.background)?d.style.backgroundImage="url("+c.background+")":d.style.background=c.background),c.backgroundSize&&(d.style.backgroundSize=c.backgroundSize),c.backgroundImage&&(d.style.backgroundImage='url("'+c.backgroundImage+'")'),c.backgroundColor&&(d.style.backgroundColor=c.backgroundColor),c.backgroundRepeat&&(d.style.backgroundRepeat=c.backgroundRepeat),c.backgroundPosition&&(d.style.backgroundPosition=c.backgroundPosition),c.backgroundTransition&&d.setAttribute("data-background-transition",c.backgroundTransition),b.appendChild(d),d}r()&&document.body.classList.add("print-pdf"),Zb.background.innerHTML="",Zb.background.classList.add("no-transition"),m(document.querySelectorAll(Sb)).forEach(function(b){var c;c=r()?a(b,b):a(b,Zb.background),m(b.querySelectorAll("section")).forEach(function(b){r()?a(b,b):a(b,c)})}),Vb.parallaxBackgroundImage?(Zb.background.style.backgroundImage='url("'+Vb.parallaxBackgroundImage+'")',Zb.background.style.backgroundSize=Vb.parallaxBackgroundSize,setTimeout(function(){Zb.wrapper.classList.add("has-parallax-background")},1)):(Zb.background.style.backgroundImage="",Zb.wrapper.classList.remove("has-parallax-background"))}function i(a){if(Zb.wrapper.classList.remove(Vb.transition),"object"==typeof a&&l(Vb,a),$b.transforms3d===!1&&(Vb.transition="linear"),Zb.wrapper.classList.add(Vb.transition),Zb.wrapper.setAttribute("data-transition-speed",Vb.transitionSpeed),Zb.wrapper.setAttribute("data-background-transition",Vb.backgroundTransition),Zb.controls.style.display=Vb.controls?"blLine truncated
|
||||
Reference in new issue
Block a user