From 29c5af84bec03273b710e65e0d9f3072b96f5ce6 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Sun, 13 Oct 2013 15:25:13 -0400 Subject: support moz and webkit prefixed requestAnimationFrame --- js/reveal.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index 19c79c8..8fae129 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -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 -- cgit v1.2.3