Get rid of goog.functions

This commit is contained in:
Björn Harrtell
2016-03-20 19:39:00 +01:00
parent baf5287ad2
commit 44e04be67f
23 changed files with 91 additions and 56 deletions
+11 -5
View File
@@ -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