Remove goog.isDef from dragpaninteraction
This commit is contained in:
@@ -28,7 +28,7 @@ ol.interaction.DragPan = function(opt_options) {
|
||||
handleUpEvent: ol.interaction.DragPan.handleUpEvent_
|
||||
});
|
||||
|
||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||
var options = opt_options ? opt_options : {};
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -51,7 +51,7 @@ ol.interaction.DragPan = function(opt_options) {
|
||||
* @private
|
||||
* @type {ol.events.ConditionType}
|
||||
*/
|
||||
this.condition_ = goog.isDef(options.condition) ?
|
||||
this.condition_ = options.condition ?
|
||||
options.condition : ol.events.condition.noModifierKeys;
|
||||
|
||||
/**
|
||||
@@ -109,7 +109,7 @@ ol.interaction.DragPan.handleUpEvent_ = function(mapBrowserEvent) {
|
||||
var distance = this.kinetic_.getDistance();
|
||||
var angle = this.kinetic_.getAngle();
|
||||
var center = view.getCenter();
|
||||
goog.asserts.assert(goog.isDef(center), 'center should be defined');
|
||||
goog.asserts.assert(center !== undefined, 'center should be defined');
|
||||
this.kineticPreRenderFn_ = this.kinetic_.pan(center);
|
||||
map.beforeRender(this.kineticPreRenderFn_);
|
||||
var centerpx = map.getPixelFromCoordinate(center);
|
||||
|
||||
Reference in New Issue
Block a user