make this work with pre-23 versions of Gecko by supporting mozRequestAnimationFrame
[lantea.git] / 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);
               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;
                 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() {
   },
 
   drawGL: function() {