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