Shared module for map browser event type enum

This commit is contained in:
Tim Schaub
2016-12-27 13:48:50 -07:00
parent 5b937f02ae
commit c6c105b62f
12 changed files with 105 additions and 102 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ goog.provide('ol.interaction.Modify');
goog.require('ol');
goog.require('ol.CollectionEventType');
goog.require('ol.Feature');
goog.require('ol.MapBrowserEvent');
goog.require('ol.MapBrowserEventType');
goog.require('ol.MapBrowserPointerEvent');
goog.require('ol.ViewHint');
goog.require('ol.array');
@@ -656,12 +656,12 @@ ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
var handled;
if (!mapBrowserEvent.map.getView().getHints()[ol.ViewHint.INTERACTING] &&
mapBrowserEvent.type == ol.MapBrowserEvent.EventType.POINTERMOVE &&
mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE &&
!this.handlingDownUpSequence) {
this.handlePointerMove_(mapBrowserEvent);
}
if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {
if (mapBrowserEvent.type != ol.MapBrowserEvent.EventType.SINGLECLICK ||
if (mapBrowserEvent.type != ol.MapBrowserEventType.SINGLECLICK ||
!this.ignoreNextSingleClick_) {
handled = this.removePoint();
} else {
@@ -669,7 +669,7 @@ ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
}
}
if (mapBrowserEvent.type == ol.MapBrowserEvent.EventType.SINGLECLICK) {
if (mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK) {
this.ignoreNextSingleClick_ = false;
}
@@ -823,7 +823,7 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
* @api
*/
ol.interaction.Modify.prototype.removePoint = function() {
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEvent.EventType.POINTERDRAG) {
if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEventType.POINTERDRAG) {
var evt = this.lastPointerEvent_;
this.willModifyFeatures_(evt);
this.removeVertex_();