Remove goog.labs.userAgent
* Remove goog.labs.* * Change to function * Change window to this * Use goog.global
This commit is contained in:
committed by
Andreas Hocevar
parent
f011b5266e
commit
18e9ff98ee
@@ -1,7 +1,5 @@
|
||||
goog.provide('ol.reproj');
|
||||
|
||||
goog.require('goog.labs.userAgent.browser');
|
||||
goog.require('goog.labs.userAgent.platform');
|
||||
goog.require('ol.dom');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.math');
|
||||
@@ -18,8 +16,18 @@ goog.require('ol.proj');
|
||||
* @type {boolean}
|
||||
* @private
|
||||
*/
|
||||
ol.reproj.browserAntialiasesClip_ = !goog.labs.userAgent.browser.isChrome() ||
|
||||
goog.labs.userAgent.platform.isIos();
|
||||
ol.reproj.browserAntialiasesClip_ = (function(winNav, winChrome) {
|
||||
// Adapted from http://stackoverflow.com/questions/4565112/javascript-how-to-find-out-if-the-user-browser-is-chrome
|
||||
var isOpera = winNav.userAgent.indexOf('OPR') > -1;
|
||||
var isIEedge = winNav.userAgent.indexOf('Edge') > -1;
|
||||
return !(
|
||||
!winNav.userAgent.match('CriOS') && // Not Chrome on iOS
|
||||
winChrome !== null && winChrome !== undefined && // Has chrome in window
|
||||
winNav.vendor === 'Google Inc.' && // Vendor is Google.
|
||||
isOpera == false && // Not Opera
|
||||
isIEedge == false // Not Edge
|
||||
);
|
||||
})(goog.global.navigator, goog.global.chrome)
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user