Get rid of goog.functions
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
goog.provide('ol.interaction.KeyboardPan');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol');
|
||||
goog.require('ol.coordinate');
|
||||
goog.require('ol.events.ConditionType');
|
||||
@@ -36,14 +35,22 @@ ol.interaction.KeyboardPan = function(opt_options) {
|
||||
|
||||
var options = opt_options || {};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
|
||||
* @return {boolean} Combined condition result.
|
||||
*/
|
||||
this.defaultCondition_ = function(mapBrowserEvent) {
|
||||
return ol.events.condition.noModifierKeys.call(this, mapBrowserEvent) &&
|
||||
ol.events.condition.targetNotEditable.call(this, mapBrowserEvent)
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.events.ConditionType}
|
||||
*/
|
||||
this.condition_ = options.condition !== undefined ?
|
||||
options.condition :
|
||||
goog.functions.and(ol.events.condition.noModifierKeys,
|
||||
ol.events.condition.targetNotEditable);
|
||||
options.condition : this.defaultCondition_
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -61,7 +68,6 @@ ol.interaction.KeyboardPan = function(opt_options) {
|
||||
};
|
||||
goog.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction);
|
||||
|
||||
|
||||
/**
|
||||
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a
|
||||
* `KeyEvent`, and decides the direction to pan to (if an arrow key was
|
||||
|
||||
Reference in New Issue
Block a user