Shared module for map browser event type enum

This commit is contained in:
Tim Schaub
2016-12-27 13:48:50 -07:00
parent 5b937f02ae
commit c6c105b62f
12 changed files with 105 additions and 102 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
goog.provide('ol.events.condition');
goog.require('ol.MapBrowserEvent');
goog.require('ol.MapBrowserEventType');
goog.require('ol.asserts');
goog.require('ol.functions');
goog.require('ol.has');
@@ -59,7 +59,7 @@ ol.events.condition.always = ol.functions.TRUE;
* @api stable
*/
ol.events.condition.click = function(mapBrowserEvent) {
return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.CLICK;
return mapBrowserEvent.type == ol.MapBrowserEventType.CLICK;
};
@@ -111,7 +111,7 @@ ol.events.condition.pointerMove = function(mapBrowserEvent) {
* @api stable
*/
ol.events.condition.singleClick = function(mapBrowserEvent) {
return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.SINGLECLICK;
return mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK;
};
@@ -123,7 +123,7 @@ ol.events.condition.singleClick = function(mapBrowserEvent) {
* @api stable
*/
ol.events.condition.doubleClick = function(mapBrowserEvent) {
return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.DBLCLICK;
return mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK;
};