Provide a method to get the most recent down type event
This will allow interactions to conditionally handle later events based on the down event.
This commit is contained in:
@@ -185,6 +185,17 @@ ol.MapBrowserEventHandler = function(map) {
|
||||
goog.inherits(ol.MapBrowserEventHandler, goog.events.EventTarget);
|
||||
|
||||
|
||||
/**
|
||||
* Get the last "down" type event. This will be set on mousedown,
|
||||
* touchstart, and pointerdown.
|
||||
* @return {goog.events.BrowserEvent} The most recent "down" type event (or null
|
||||
* if none have occurred).
|
||||
*/
|
||||
ol.MapBrowserEventHandler.prototype.getDown = function() {
|
||||
return this.down_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {goog.events.BrowserEvent} browserEvent Browser event.
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user