fixed requestAnimationFrame callback for IE9

This commit is contained in:
javi 2013-11-21 13:23:31 +01:00
parent 3de6faba75
commit f8f35c6a33

View File

@ -29,7 +29,9 @@ L.CanvasLayer = L.Class.extend({
this._canvas = document.createElement('canvas');
this._ctx = this._canvas.getContext('2d');
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
return window.setTimeout(callback, 1000 / 60);
};
this.requestAnimationFrame = requestAnimationFrame;
},