Move CLONE_PROPS to ol.pointer.PointerEventHandler

This commit is contained in:
Tim Schaub
2016-12-03 10:48:32 -08:00
parent fda2d8e40e
commit ab640a20d0

View File

@@ -205,9 +205,9 @@ ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
*/
ol.pointer.PointerEventHandler.prototype.cloneEvent = function(event, inEvent) {
var eventCopy = {}, p;
for (var i = 0, ii = ol.pointer.CLONE_PROPS.length; i < ii; i++) {
p = ol.pointer.CLONE_PROPS[i][0];
eventCopy[p] = event[p] || inEvent[p] || ol.pointer.CLONE_PROPS[i][1];
for (var i = 0, ii = ol.pointer.PointerEventHandler.CLONE_PROPS.length; i < ii; i++) {
p = ol.pointer.PointerEventHandler.CLONE_PROPS[i][0];
eventCopy[p] = event[p] || inEvent[p] || ol.pointer.PointerEventHandler.CLONE_PROPS[i][1];
}
return eventCopy;
@@ -407,7 +407,7 @@ ol.pointer.PointerEventHandler.prototype.disposeInternal = function() {
* Properties to copy when cloning an event, with default values.
* @type {Array.<Array>}
*/
ol.pointer.CLONE_PROPS = [
ol.pointer.PointerEventHandler.CLONE_PROPS = [
// MouseEvent
['bubbles', false],
['cancelable', false],