From: Robert Kaiser Date: Fri, 28 Mar 2014 21:27:38 +0000 (+0100) Subject: make this work with pre-23 versions of Gecko by supporting mozRequestAnimationFrame X-Git-Tag: producution~36 X-Git-Url: https://git-public.kairo.at/?p=lantea.git;a=commitdiff_plain;h=0c7de38028c2e5a599ba6e3c18f2a6b00061439a make this work with pre-23 versions of Gecko by supporting mozRequestAnimationFrame --- diff --git a/js/map.js b/js/map.js index ccfa87d..cf095cb 100644 --- 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() {