Use a ol.interaction.condition in ol.interaction.Select

This commit is contained in:
Frederic Junod
2013-08-28 15:33:15 +02:00
committed by ahocevar
parent bb93a86528
commit 89bdd3bc2c
3 changed files with 23 additions and 5 deletions
+10 -1
View File
@@ -1,7 +1,7 @@
goog.provide('ol.interaction.ConditionType');
goog.provide('ol.interaction.condition');
goog.require('goog.dom.TagName');
goog.require('goog.events.EventType');
goog.require('goog.functions');
@@ -42,6 +42,15 @@ ol.interaction.condition.altShiftKeysOnly = function(browserEvent) {
ol.interaction.condition.always = goog.functions.TRUE;
/**
* @param {goog.events.BrowserEvent} browserEvent Browser event.
* @return {boolean} True if only the shift key is pressed.
*/
ol.interaction.condition.clickEventOnly = function(browserEvent) {
return browserEvent.type == goog.events.EventType.CLICK;
};
/**
* @param {goog.events.BrowserEvent} browserEvent Browser event.
* @return {boolean} True if only the no modifier keys are pressed.