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:
Tim Schaub
2013-11-07 11:21:01 -07:00
parent 812cb7fb12
commit 22fb418236
2 changed files with 43 additions and 0 deletions
+11
View File
@@ -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