Remove goog.isNull in deviceorientation class
This commit is contained in:
@@ -208,10 +208,10 @@ ol.DeviceOrientation.prototype.getTracking = function() {
|
||||
ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() {
|
||||
if (ol.has.DEVICE_ORIENTATION) {
|
||||
var tracking = this.getTracking();
|
||||
if (tracking && goog.isNull(this.listenerKey_)) {
|
||||
if (tracking && !this.listenerKey_) {
|
||||
this.listenerKey_ = goog.events.listen(goog.global, 'deviceorientation',
|
||||
this.orientationChange_, false, this);
|
||||
} else if (!tracking && !goog.isNull(this.listenerKey_)) {
|
||||
} else if (!tracking && this.listenerKey_) {
|
||||
goog.events.unlistenByKey(this.listenerKey_);
|
||||
this.listenerKey_ = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user