Move ol defines from browserfeature.js to ol.js

This commit is contained in:
Tim Schaub
2014-04-30 08:24:00 -06:00
parent 12d4cb5752
commit 3f0da11008
2 changed files with 69 additions and 67 deletions

View File

@@ -2,76 +2,11 @@ goog.provide('ol.BrowserFeature');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.userAgent');
goog.require('ol');
goog.require('ol.dom');
goog.require('ol.webgl');
/**
* @define {boolean} Assume touch.
*/
ol.ASSUME_TOUCH = false;
/**
* @define {boolean} Whether to enable canvas.
*/
ol.ENABLE_CANVAS = true;
/**
* @define {boolean} Whether to enable DOM.
*/
ol.ENABLE_DOM = true;
/**
* @define {boolean} Whether to enable rendering of image layers.
*/
ol.ENABLE_IMAGE = true;
/**
* @define {boolean} Whether to enable rendering of tile layers.
*/
ol.ENABLE_TILE = true;
/**
* @define {boolean} Whether to enable rendering of vector layers.
*/
ol.ENABLE_VECTOR = true;
/**
* @define {boolean} Whether to enable WebGL.
*/
ol.ENABLE_WEBGL = true;
/**
* @define {boolean} Whether to support legacy IE (7-8).
*/
ol.LEGACY_IE_SUPPORT = false;
/**
* The page is loaded using HTTPS.
* @const
* @type {boolean}
*/
ol.IS_HTTPS = goog.global.location.protocol === 'https:';
/**
* 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`).

View File

@@ -1,9 +1,76 @@
goog.require('goog.userAgent');
goog.provide('ol');
/**
* @define {boolean} Assume touch.
*/
ol.ASSUME_TOUCH = false;
/**
* @define {boolean} Whether to enable canvas.
*/
ol.ENABLE_CANVAS = true;
/**
* @define {boolean} Whether to enable DOM.
*/
ol.ENABLE_DOM = true;
/**
* @define {boolean} Whether to enable rendering of image layers.
*/
ol.ENABLE_IMAGE = true;
/**
* @define {boolean} Whether to enable rendering of tile layers.
*/
ol.ENABLE_TILE = true;
/**
* @define {boolean} Whether to enable rendering of vector layers.
*/
ol.ENABLE_VECTOR = true;
/**
* @define {boolean} Whether to enable WebGL.
*/
ol.ENABLE_WEBGL = true;
/**
* @define {boolean} Whether to support legacy IE (7-8).
*/
ol.LEGACY_IE_SUPPORT = false;
/**
* The page is loaded using HTTPS.
* @const
* @type {boolean}
*/
ol.IS_HTTPS = goog.global.location.protocol === 'https:';
/**
* 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 !== '';
/**
* ol.inherits is an alias to the goog.inherits function. It is exported
* for use in non-compiled application code. See ol.exports.
* for use in non-compiled application code.
*
* FIXME: We use a new line to fake the linter. Without the new line the
* linter complains with: