Add ol.events.condition.click
This commit is contained in:
@@ -55,6 +55,16 @@ ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) {
|
|||||||
ol.events.condition.always = goog.functions.TRUE;
|
ol.events.condition.always = goog.functions.TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||||
|
* @return {boolean} True if the event is a map `click` event.
|
||||||
|
* @todo api
|
||||||
|
*/
|
||||||
|
ol.events.condition.click = function(mapBrowserEvent) {
|
||||||
|
return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.CLICK;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
* @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
|
||||||
* @return {boolean} True if the browser event is a `mousemove` event.
|
* @return {boolean} True if the browser event is a `mousemove` event.
|
||||||
|
|||||||
Reference in New Issue
Block a user