Remove ol.global

This commit is contained in:
Tim Schaub
2016-09-01 22:28:20 -06:00
parent 785639338b
commit 651c6959ab
20 changed files with 55 additions and 96 deletions
+7 -7
View File
@@ -17,18 +17,18 @@ goog.require('ol.proj');
* @type {boolean}
* @private
*/
ol.reproj.browserAntialiasesClip_ = (function(global) {
ol.reproj.browserAntialiasesClip_ = (function() {
// Adapted from http://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome
var isOpera = global.navigator.userAgent.indexOf('OPR') > -1;
var isIEedge = global.navigator.userAgent.indexOf('Edge') > -1;
var isOpera = navigator.userAgent.indexOf('OPR') > -1;
var isIEedge = navigator.userAgent.indexOf('Edge') > -1;
return !(
!global.navigator.userAgent.match('CriOS') && // Not Chrome on iOS
global.chrome !== null && global.chrome !== undefined && // Has chrome in window
global.navigator.vendor === 'Google Inc.' && // Vendor is Google.
!navigator.userAgent.match('CriOS') && // Not Chrome on iOS
'chrome' in window && // Has chrome in window
navigator.vendor === 'Google Inc.' && // Vendor is Google.
isOpera == false && // Not Opera
isIEedge == false // Not Edge
);
})(ol.global);
})();
/**
+1 -2
View File
@@ -300,8 +300,7 @@ ol.reproj.Tile.prototype.load = function() {
});
if (leftToLoad === 0) {
var global = ol.global;
global.setTimeout(this.reproject_.bind(this), 0);
setTimeout(this.reproject_.bind(this), 0);
}
}
};