Use ol.isDef when checking booleans

This commit is contained in:
Marc Jansen
2015-09-22 10:55:46 +02:00
committed by Tim Schaub
parent 0e4c73072f
commit 68442578ba
6 changed files with 26 additions and 19 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
goog.provide('ol.interaction.DragRotate');
goog.require('ol');
goog.require('ol.ViewHint');
goog.require('ol.events.ConditionType');
goog.require('ol.events.condition');
@@ -68,7 +69,7 @@ ol.interaction.DragRotate.handleDragEvent_ = function(mapBrowserEvent) {
var offset = mapBrowserEvent.pixel;
var theta =
Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);
if (this.lastAngle_ !== undefined) {
if (ol.isDef(this.lastAngle_)) {
var delta = theta - this.lastAngle_;
var view = map.getView();
var rotation = view.getRotation();