Remove goog.isNull in control classes

This commit is contained in:
Marc Jansen
2015-09-29 15:18:26 +02:00
parent 8813180d41
commit d728c71f02
9 changed files with 24 additions and 24 deletions

View File

@@ -160,7 +160,7 @@ ol.control.ScaleLine.prototype.getUnits = function() {
*/
ol.control.ScaleLine.render = function(mapEvent) {
var frameState = mapEvent.frameState;
if (goog.isNull(frameState)) {
if (!frameState) {
this.viewState_ = null;
} else {
this.viewState_ = frameState.viewState;
@@ -194,7 +194,7 @@ ol.control.ScaleLine.prototype.setUnits = function(units) {
ol.control.ScaleLine.prototype.updateElement_ = function() {
var viewState = this.viewState_;
if (goog.isNull(viewState)) {
if (!viewState) {
if (this.renderedVisible_) {
goog.style.setElementShown(this.element_, false);
this.renderedVisible_ = false;
@@ -226,7 +226,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
units == ol.control.ScaleLineUnits.DEGREES) {
// Convert pointResolution from other units to degrees
if (goog.isNull(this.toEPSG4326_)) {
if (!this.toEPSG4326_) {
this.toEPSG4326_ = ol.proj.getTransformFromProjections(
projection, ol.proj.get('EPSG:4326'));
}