support moz and webkit prefixed requestAnimationFrame
This commit is contained in:
parent
6aaf88aae7
commit
29c5af84be
2 changed files with 7 additions and 6 deletions
|
@ -221,7 +221,8 @@ var Reveal = (function(){
|
||||||
'OTransform' in document.body.style ||
|
'OTransform' in document.body.style ||
|
||||||
'transform' 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;
|
features.canvas = !!document.createElement( 'canvas' ).getContext;
|
||||||
|
|
||||||
|
@ -2866,7 +2867,7 @@ var Reveal = (function(){
|
||||||
this.render();
|
this.render();
|
||||||
|
|
||||||
if( this.playing ) {
|
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
|
// Solid background color
|
||||||
this.context.beginPath();
|
this.context.beginPath();
|
||||||
this.context.arc( x, y, radius, 0, Math.PI * 2, false );
|
this.context.arc( x, y, radius + 2, 0, Math.PI * 2, false );
|
||||||
this.context.fillStyle = 'rgba(0,0,0,0.2)';
|
this.context.fillStyle = 'rgba( 0, 0, 0, 0.4 )';
|
||||||
this.context.fill();
|
this.context.fill();
|
||||||
|
|
||||||
// Draw progress track
|
// Draw progress track
|
||||||
|
|
4
js/reveal.min.js
vendored
4
js/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue