Add a 'boxdrag' event to ol.interaction.DragBox. Resolves #4563 .

This commit is contained in:
Philip "digitalfox" Kovac
2016-01-12 17:16:56 -05:00
parent fdc2f9d97e
commit 83e173d91f

View File

@@ -29,6 +29,14 @@ ol.DragBoxEventType = {
* @api stable
*/
BOXSTART: 'boxstart',
/**
* Triggered on drag when box is active.
* @event ol.DragBoxEvent#boxdrag
* @api
*/
BOXDRAG: 'boxdrag',
/**
* Triggered upon drag box end.
* @event ol.DragBoxEvent#boxend
@@ -167,6 +175,9 @@ ol.interaction.DragBox.handleDragEvent_ = function(mapBrowserEvent) {
}
this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
this.dispatchEvent(new ol.DragBoxEvent(ol.DragBoxEventType.BOXDRAG,
mapBrowserEvent.coordinate, mapBrowserEvent));
};