diff --git a/src/ol/interaction/pinchzoominteraction.js b/src/ol/interaction/pinchzoominteraction.js index b4195ef6b4..7ff5b8f0c2 100644 --- a/src/ol/interaction/pinchzoominteraction.js +++ b/src/ol/interaction/pinchzoominteraction.js @@ -3,6 +3,7 @@ goog.provide('ol.interaction.PinchZoom'); goog.require('goog.asserts'); goog.require('goog.functions'); goog.require('goog.style'); +goog.require('ol'); goog.require('ol.Coordinate'); goog.require('ol.ViewHint'); goog.require('ol.interaction.Interaction'); @@ -28,7 +29,7 @@ ol.interaction.PinchZoom = function(opt_options) { handleUpEvent: ol.interaction.PinchZoom.handleUpEvent_ }); - var options = goog.isDef(opt_options) ? opt_options : {}; + var options = opt_options ? opt_options : {}; /** * @private @@ -40,7 +41,8 @@ ol.interaction.PinchZoom = function(opt_options) { * @private * @type {number} */ - this.duration_ = goog.isDef(options.duration) ? options.duration : 400; + this.duration_ = ol.isDef(options.duration) ? + /** @type {number} */ (options.duration) : 400; /** * @private @@ -76,7 +78,7 @@ ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) { // distance between touches var distance = Math.sqrt(dx * dx + dy * dy); - if (goog.isDef(this.lastDistance_)) { + if (ol.isDef(this.lastDistance_)) { scaleDelta = this.lastDistance_ / distance; } this.lastDistance_ = distance;