goog.require creates a namespace object already
This commit is contained in:
@@ -8,22 +8,22 @@ ol.ASSUME_TOUCH = false;
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
*/
|
||||
ol.BrowserFeature = {
|
||||
/**
|
||||
* The ratio between physical pixels and device-independent pixels
|
||||
* (dips) on the device (`window.devicePixelRatio`).
|
||||
* @type {number}
|
||||
*/
|
||||
DEVICE_PIXEL_RATIO: goog.global.devicePixelRatio || 1,
|
||||
* The ratio between physical pixels and device-independent pixels
|
||||
* (dips) on the device (`window.devicePixelRatio`).
|
||||
* @const
|
||||
* @type {number}
|
||||
* @todo stability experimental
|
||||
*/
|
||||
ol.BrowserFeature.DEVICE_PIXEL_RATIO = goog.global.devicePixelRatio || 1;
|
||||
|
||||
/**
|
||||
* True if browser supports touch events.
|
||||
* @type {boolean}
|
||||
*/
|
||||
HAS_TOUCH: ol.ASSUME_TOUCH ||
|
||||
(goog.global.document &&
|
||||
'ontouchstart' in goog.global.document.documentElement) ||
|
||||
!!(goog.global.navigator.msPointerEnabled)
|
||||
};
|
||||
|
||||
/**
|
||||
* True if browser supports touch events.
|
||||
* @const
|
||||
* @type {boolean}
|
||||
* @todo stability experimental
|
||||
*/
|
||||
ol.BrowserFeature.HAS_TOUCH = ol.ASSUME_TOUCH ||
|
||||
(goog.global.document &&
|
||||
'ontouchstart' in goog.global.document.documentElement) ||
|
||||
!!(goog.global.navigator.msPointerEnabled);
|
||||
|
||||
Reference in New Issue
Block a user