Add ol.events.condition.click

This commit is contained in:
Éric Lemoine
2014-06-30 09:07:30 +02:00
parent 67c2e46c19
commit 355ca67b86

View File

@@ -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.