Move DEDUP_TIMEOUT and CLICK_COUNT_TIMEOUT constants out of the instance
This commit is contained in:
committed by
tsauerwein
parent
fcb52d2361
commit
f5b15f737f
@@ -63,20 +63,6 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
|
||||
*/
|
||||
this.mouseSource = mouseSource;
|
||||
|
||||
/**
|
||||
* Mouse event timeout: This should be long enough to
|
||||
* ignore compat mouse events made by touch.
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
this.DEDUP_TIMEOUT = 2500;
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
this.CLICK_COUNT_TIMEOUT = 200;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {?number}
|
||||
@@ -98,6 +84,22 @@ ol.pointer.TouchSource = function(dispatcher, mouseSource) {
|
||||
goog.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);
|
||||
|
||||
|
||||
/**
|
||||
* Mouse event timeout: This should be long enough to
|
||||
* ignore compat mouse events made by touch.
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
ol.pointer.TouchSource.DEDUP_TIMEOUT = 2500;
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {number}
|
||||
*/
|
||||
ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT = 200;
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {string}
|
||||
@@ -152,7 +154,7 @@ ol.pointer.TouchSource.prototype.resetClickCount_ = function() {
|
||||
this.resetId_ = null;
|
||||
};
|
||||
this.resetId_ = goog.global.setTimeout(goog.bind(fn, this),
|
||||
this.CLICK_COUNT_TIMEOUT);
|
||||
ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT);
|
||||
};
|
||||
|
||||
|
||||
@@ -444,6 +446,6 @@ ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {
|
||||
if (i > -1) {
|
||||
lts.splice(i, 1);
|
||||
}
|
||||
}, this.DEDUP_TIMEOUT);
|
||||
}, ol.pointer.TouchSource.DEDUP_TIMEOUT);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user