Remove goog.style.setElementShown

This commit is contained in:
nicholas
2016-03-25 18:03:04 +13:00
committed by Nicholas L
parent 96a14e0515
commit 04c4b4efc1
7 changed files with 19 additions and 27 deletions
+3 -4
View File
@@ -4,7 +4,6 @@ goog.provide('ol.control.ScaleLineUnits');
goog.require('goog.asserts');
goog.require('ol.events');
goog.require('goog.style');
goog.require('ol');
goog.require('ol.Object');
goog.require('ol.control.Control');
@@ -183,7 +182,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
if (!viewState) {
if (this.renderedVisible_) {
goog.style.setElementShown(this.element_, false);
this.element_.style.display = 'none';
this.renderedVisible_ = false;
}
return;
@@ -258,7 +257,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
Math.pow(10, Math.floor(i / 3));
width = Math.round(count / pointResolution);
if (isNaN(width)) {
goog.style.setElementShown(this.element_, false);
this.element_.style.display = 'none'; // Hide the element
this.renderedVisible_ = false;
return;
} else if (width >= this.minWidth_) {
@@ -279,7 +278,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
}
if (!this.renderedVisible_) {
goog.style.setElementShown(this.element_, true);
this.element_.style.display = ''; //Show the element
this.renderedVisible_ = true;
}