Private enum for drag box event types
This commit is contained in:
@@ -103,7 +103,7 @@ ol.interaction.DragBox.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
|
||||
this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
|
||||
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType.BOXDRAG,
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXDRAG,
|
||||
mapBrowserEvent.coordinate, mapBrowserEvent));
|
||||
};
|
||||
|
||||
@@ -143,7 +143,7 @@ ol.interaction.DragBox.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
if (this.boxEndCondition_(mapBrowserEvent,
|
||||
this.startPixel_, mapBrowserEvent.pixel)) {
|
||||
this.onBoxEnd(mapBrowserEvent);
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType.BOXEND,
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXEND,
|
||||
mapBrowserEvent.coordinate, mapBrowserEvent));
|
||||
}
|
||||
return false;
|
||||
@@ -166,7 +166,7 @@ ol.interaction.DragBox.handleDownEvent_ = function(mapBrowserEvent) {
|
||||
this.startPixel_ = mapBrowserEvent.pixel;
|
||||
this.box_.setMap(mapBrowserEvent.map);
|
||||
this.box_.setPixels(this.startPixel_, this.startPixel_);
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType.BOXSTART,
|
||||
this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXSTART,
|
||||
mapBrowserEvent.coordinate, mapBrowserEvent));
|
||||
return true;
|
||||
} else {
|
||||
@@ -177,8 +177,9 @@ ol.interaction.DragBox.handleDownEvent_ = function(mapBrowserEvent) {
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
* @private
|
||||
*/
|
||||
ol.interaction.DragBox.EventType = {
|
||||
ol.interaction.DragBox.EventType_ = {
|
||||
/**
|
||||
* Triggered upon drag box start.
|
||||
* @event ol.interaction.DragBox.Event#boxstart
|
||||
|
||||
Reference in New Issue
Block a user