Add ol.ASSUME_TOUCH @define

This commit is contained in:
Tom Payne
2012-09-27 18:21:21 +02:00
parent 7415a11c63
commit 8dc57d5148

View File

@@ -1,10 +1,17 @@
goog.provide('ol.BrowserFeature'); goog.provide('ol.BrowserFeature');
/**
* @define {boolean} Assume touch.
*/
ol.ASSUME_TOUCH = false;
/** /**
* @type {Object} * @type {Object}
*/ */
ol.BrowserFeature = { ol.BrowserFeature = {
// Do we have touch events? // Do we have touch events?
HAS_TOUCH: document && 'ontouchstart' in document.documentElement HAS_TOUCH: ol.ASSUME_TOUCH ||
(document && 'ontouchstart' in document.documentElement)
}; };