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 ccfa87d419f74d138bd2d67923d72fbad74ce8f7..cf095cb13f3d199e4226791a4fbde8dfa5ebcb9c 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() {