clickOnly condition checks map clicks

This commit is contained in:
Éric Lemoine
2013-10-30 10:57:26 +01:00
parent 6ab88aad72
commit 2c930d74b5

View File

@@ -2,8 +2,8 @@ goog.provide('ol.events.ConditionType');
goog.provide('ol.events.condition');
goog.require('goog.dom.TagName');
goog.require('goog.events.EventType');
goog.require('goog.functions');
goog.require('ol.MapBrowserEvent.EventType');
/**
@@ -55,8 +55,7 @@ ol.events.condition.always = goog.functions.TRUE;
* @todo stability experimental
*/
ol.events.condition.clickOnly = function(mapBrowserEvent) {
var browserEvent = mapBrowserEvent.browserEvent;
return browserEvent.type == goog.events.EventType.CLICK;
return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.CLICK;
};