Remove goog.isDef from pinchrotateinteraction
This commit is contained in:
@@ -3,6 +3,7 @@ goog.provide('ol.interaction.PinchRotate');
|
|||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('goog.functions');
|
goog.require('goog.functions');
|
||||||
goog.require('goog.style');
|
goog.require('goog.style');
|
||||||
|
goog.require('ol');
|
||||||
goog.require('ol.Coordinate');
|
goog.require('ol.Coordinate');
|
||||||
goog.require('ol.ViewHint');
|
goog.require('ol.ViewHint');
|
||||||
goog.require('ol.interaction.Interaction');
|
goog.require('ol.interaction.Interaction');
|
||||||
@@ -28,7 +29,7 @@ ol.interaction.PinchRotate = function(opt_options) {
|
|||||||
handleUpEvent: ol.interaction.PinchRotate.handleUpEvent_
|
handleUpEvent: ol.interaction.PinchRotate.handleUpEvent_
|
||||||
});
|
});
|
||||||
|
|
||||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
var options = ol.isDef(opt_options) ? opt_options : {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -58,13 +59,15 @@ ol.interaction.PinchRotate = function(opt_options) {
|
|||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.threshold_ = goog.isDef(options.threshold) ? options.threshold : 0.3;
|
this.threshold_ = ol.isDef(options.threshold) ?
|
||||||
|
/** @type {number} */ (options.threshold) : 0.3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
this.duration_ = goog.isDef(options.duration) ? options.duration : 250;
|
this.duration_ = ol.isDef(options.duration) ?
|
||||||
|
/** @type {number} */ (options.duration) : 250;
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
|
goog.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
|
||||||
@@ -88,7 +91,7 @@ ol.interaction.PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
|||||||
touch1.clientY - touch0.clientY,
|
touch1.clientY - touch0.clientY,
|
||||||
touch1.clientX - touch0.clientX);
|
touch1.clientX - touch0.clientX);
|
||||||
|
|
||||||
if (goog.isDef(this.lastAngle_)) {
|
if (ol.isDef(this.lastAngle_)) {
|
||||||
var delta = angle - this.lastAngle_;
|
var delta = angle - this.lastAngle_;
|
||||||
this.rotationDelta_ += delta;
|
this.rotationDelta_ += delta;
|
||||||
if (!this.rotating_ &&
|
if (!this.rotating_ &&
|
||||||
|
|||||||
Reference in New Issue
Block a user