Add a compile-time flag to enable legacy IE support

This commit is contained in:
Austin Hyde
2014-01-31 10:46:16 -05:00
parent 74a9a155b1
commit 9ffed5bf5f
5 changed files with 109 additions and 43 deletions

View File

@@ -2,6 +2,7 @@ goog.provide('ol.BrowserFeature');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.userAgent');
goog.require('ol.webgl');
@@ -47,6 +48,21 @@ ol.ENABLE_VECTOR = true;
ol.ENABLE_WEBGL = true;
/**
* @define {boolean} Whether to support legacy IE (7-8).
*/
ol.LEGACY_IE_SUPPORT = false;
/**
* Whether the current browser is legacy IE
* @const
* @type {boolean}
*/
ol.IS_LEGACY_IE = goog.userAgent.IE &&
goog.userAgent.isVersionOrHigher('9.0') && goog.userAgent.VERSION !== '';
/**
* The ratio between physical pixels and device-independent pixels
* (dips) on the device (`window.devicePixelRatio`).