Remove goog.isNull in overlay class

This commit is contained in:
Marc Jansen
2015-09-29 15:24:25 +02:00
parent 5502083af9
commit 2b84e0f245
+4 -4
View File
@@ -254,7 +254,7 @@ ol.Overlay.prototype.handleElementChanged = function() {
* @protected * @protected
*/ */
ol.Overlay.prototype.handleMapChanged = function() { ol.Overlay.prototype.handleMapChanged = function() {
if (!goog.isNull(this.mapPostrenderListenerKey_)) { if (this.mapPostrenderListenerKey_) {
goog.dom.removeNode(this.element_); goog.dom.removeNode(this.element_);
goog.events.unlistenByKey(this.mapPostrenderListenerKey_); goog.events.unlistenByKey(this.mapPostrenderListenerKey_);
this.mapPostrenderListenerKey_ = null; this.mapPostrenderListenerKey_ = null;
@@ -366,7 +366,7 @@ ol.Overlay.prototype.panIntoView_ = function() {
goog.asserts.assert(this.autoPan, 'this.autoPan should be true'); goog.asserts.assert(this.autoPan, 'this.autoPan should be true');
var map = this.getMap(); var map = this.getMap();
if (map === undefined || goog.isNull(map.getTargetElement())) { if (map === undefined || !map.getTargetElement()) {
return; return;
} }
@@ -409,7 +409,7 @@ ol.Overlay.prototype.panIntoView_ = function() {
centerPx[1] + delta[1] centerPx[1] + delta[1]
]; ];
if (!goog.isNull(this.autoPanAnimation_)) { if (this.autoPanAnimation_) {
this.autoPanAnimation_.source = center; this.autoPanAnimation_.source = center;
map.beforeRender(ol.animation.pan(this.autoPanAnimation_)); map.beforeRender(ol.animation.pan(this.autoPanAnimation_));
} }
@@ -489,7 +489,7 @@ ol.Overlay.prototype.updatePixelPosition = function() {
* @protected * @protected
*/ */
ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) { ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
goog.asserts.assert(!goog.isNull(pixel), 'pixel should not be null'); goog.asserts.assert(pixel, 'pixel should not be null');
goog.asserts.assert(mapSize !== undefined, 'mapSize should be defined'); goog.asserts.assert(mapSize !== undefined, 'mapSize should be defined');
var style = this.element_.style; var style = this.element_.style;
var offset = this.getOffset(); var offset = this.getOffset();