make this work with pre-23 versions of Gecko by supporting mozRequestAnimationFrame
authorRobert Kaiser <kairo@kairo.at>
Fri, 28 Mar 2014 21:27:38 +0000 (22:27 +0100)
committerRobert Kaiser <kairo@kairo.at>
Fri, 28 Mar 2014 21:27:38 +0000 (22:27 +0100)
js/map.js

index ccfa87d..cf095cb 100644 (file)
--- a/js/map.js
+++ b/js/map.js
@@ -355,7 +355,7 @@ var gMap = {
               var imgObj = new Image();
               imgObj.onload = function() {
                 gMap.loadImageToTexture(imgObj, aTileKey);
-                requestAnimationFrame(function(aTimestamp) { gMap.drawGL() });
+                window.requestAnimationFrame(function(aTimestamp) { gMap.drawGL() });
                 URL.revokeObjectURL(imgURL);
               }
               imgObj.src = imgURL;
@@ -364,7 +364,7 @@ var gMap = {
         }
       }
     }
-    requestAnimationFrame(function(aTimestamp) { gMap.drawGL() });
+    window.requestAnimationFrame(function(aTimestamp) { gMap.drawGL() });
   },
 
   drawGL: function() {