Add ol.pointer.TouchSource.POINTER_TYPE constant
This commit is contained in:
committed by
tsauerwein
parent
a74ad0e459
commit
a916e2500b
@@ -72,12 +72,6 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
|
|||||||
*/
|
*/
|
||||||
this.CLICK_COUNT_TIMEOUT = 200;
|
this.CLICK_COUNT_TIMEOUT = 200;
|
||||||
|
|
||||||
/**
|
|
||||||
* @const
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this.POINTER_TYPE = 'touch';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?number}
|
* @type {?number}
|
||||||
@@ -110,6 +104,13 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
|
|||||||
goog.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);
|
goog.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
ol.pointer.TouchSource.POINTER_TYPE = 'touch';
|
||||||
|
|
||||||
|
|
||||||
/** @inheritDoc */
|
/** @inheritDoc */
|
||||||
ol.pointer.TouchSource.prototype.getEvents = function() {
|
ol.pointer.TouchSource.prototype.getEvents = function() {
|
||||||
return goog.object.getKeys(this.mapping);
|
return goog.object.getKeys(this.mapping);
|
||||||
@@ -207,7 +208,7 @@ ol.pointer.TouchSource.prototype.touchToPointer_ =
|
|||||||
e.height = inTouch['webkitRadiusY'] || inTouch['radiusY'] || 0;
|
e.height = inTouch['webkitRadiusY'] || inTouch['radiusY'] || 0;
|
||||||
e.pressure = inTouch['webkitForce'] || inTouch['force'] || 0.5;
|
e.pressure = inTouch['webkitForce'] || inTouch['force'] || 0.5;
|
||||||
e.isPrimary = this.isPrimaryTouch_(inTouch);
|
e.isPrimary = this.isPrimaryTouch_(inTouch);
|
||||||
e.pointerType = this.POINTER_TYPE;
|
e.pointerType = ol.pointer.TouchSource.POINTER_TYPE;
|
||||||
|
|
||||||
// make sure that the properties that are different for
|
// make sure that the properties that are different for
|
||||||
// each `Touch` object are not copied from the BrowserEvent object
|
// each `Touch` object are not copied from the BrowserEvent object
|
||||||
|
|||||||
Reference in New Issue
Block a user