Rename _ol_MapBrowserEventType_ to MapBrowserEventType

This commit is contained in:
Marc Jansen
2017-12-15 09:43:26 +01:00
committed by Frederic Junod
parent 465c248572
commit 039bde29cc
9 changed files with 49 additions and 49 deletions

View File

@@ -3,7 +3,7 @@
*/
import {inherits, nullFunction} from '../index.js';
import {FALSE} from '../functions.js';
import _ol_MapBrowserEventType_ from '../MapBrowserEventType.js';
import MapBrowserEventType from '../MapBrowserEventType.js';
import _ol_MapBrowserPointerEvent_ from '../MapBrowserPointerEvent.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
import _ol_obj_ from '../obj.js';
@@ -109,9 +109,9 @@ _ol_interaction_Pointer_.centroid = function(pointerEvents) {
*/
_ol_interaction_Pointer_.prototype.isPointerDraggingEvent_ = function(mapBrowserEvent) {
var type = mapBrowserEvent.type;
return type === _ol_MapBrowserEventType_.POINTERDOWN ||
type === _ol_MapBrowserEventType_.POINTERDRAG ||
type === _ol_MapBrowserEventType_.POINTERUP;
return type === MapBrowserEventType.POINTERDOWN ||
type === MapBrowserEventType.POINTERDRAG ||
type === MapBrowserEventType.POINTERUP;
};
@@ -124,10 +124,10 @@ _ol_interaction_Pointer_.prototype.updateTrackedPointers_ = function(mapBrowserE
var event = mapBrowserEvent.pointerEvent;
var id = event.pointerId.toString();
if (mapBrowserEvent.type == _ol_MapBrowserEventType_.POINTERUP) {
if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {
delete this.trackedPointers_[id];
} else if (mapBrowserEvent.type ==
_ol_MapBrowserEventType_.POINTERDOWN) {
MapBrowserEventType.POINTERDOWN) {
this.trackedPointers_[id] = event;
} else if (id in this.trackedPointers_) {
// update only when there was a pointerdown event for this pointer
@@ -185,18 +185,18 @@ _ol_interaction_Pointer_.handleEvent = function(mapBrowserEvent) {
var stopEvent = false;
this.updateTrackedPointers_(mapBrowserEvent);
if (this.handlingDownUpSequence) {
if (mapBrowserEvent.type == _ol_MapBrowserEventType_.POINTERDRAG) {
if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {
this.handleDragEvent_(mapBrowserEvent);
} else if (mapBrowserEvent.type == _ol_MapBrowserEventType_.POINTERUP) {
} else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {
var handledUp = this.handleUpEvent_(mapBrowserEvent);
this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;
}
} else {
if (mapBrowserEvent.type == _ol_MapBrowserEventType_.POINTERDOWN) {
if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {
var handled = this.handleDownEvent_(mapBrowserEvent);
this.handlingDownUpSequence = handled;
stopEvent = this.shouldStopEvent(handled);
} else if (mapBrowserEvent.type == _ol_MapBrowserEventType_.POINTERMOVE) {
} else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {
this.handleMoveEvent_(mapBrowserEvent);
}
}