Remove goog.isNull in interaction classes

This commit is contained in:
Marc Jansen
2015-09-29 15:19:11 +02:00
parent 3c4e663224
commit be2e4a33ae
11 changed files with 52 additions and 56 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ ol.interaction.DragPan.handleDragEvent_ = function(mapBrowserEvent) {
if (this.kinetic_) {
this.kinetic_.update(centroid[0], centroid[1]);
}
if (!goog.isNull(this.lastCentroid)) {
if (this.lastCentroid) {
var deltaX = this.lastCentroid[0] - centroid[0];
var deltaY = centroid[1] - this.lastCentroid[1];
var map = mapBrowserEvent.map;
@@ -145,7 +145,7 @@ ol.interaction.DragPan.handleDownEvent_ = function(mapBrowserEvent) {
view.setHint(ol.ViewHint.INTERACTING, 1);
}
map.render();
if (!goog.isNull(this.kineticPreRenderFn_) &&
if (this.kineticPreRenderFn_ &&
map.removePreRenderFunction(this.kineticPreRenderFn_)) {
view.setCenter(mapBrowserEvent.frameState.viewState.center);
this.kineticPreRenderFn_ = null;