Use a ol.interaction.condition in ol.interaction.Select
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user