diff --git a/src/ol/control/attributioncontrol.js b/src/ol/control/attributioncontrol.js index 206339033c..20146d7f38 100644 --- a/src/ol/control/attributioncontrol.js +++ b/src/ol/control/attributioncontrol.js @@ -4,7 +4,6 @@ goog.provide('ol.control.Attribution'); goog.require('goog.asserts'); goog.require('goog.dom'); -goog.require('goog.style'); goog.require('ol'); goog.require('ol.Attribution'); goog.require('ol.control.Control'); @@ -44,7 +43,7 @@ ol.control.Attribution = function(opt_options) { this.logoLi_ = document.createElement('LI'); this.ulElement_.appendChild(this.logoLi_); - goog.style.setElementShown(this.logoLi_, false); + this.logoLi_.style.display = 'none'; // Hide the logo /** * @private @@ -214,7 +213,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { if (!frameState) { if (this.renderedVisible_) { - goog.style.setElementShown(this.element, false); + this.element.style.display = 'none'; //Hide the element this.renderedVisible_ = false; } return; @@ -230,15 +229,13 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { for (attributionKey in this.attributionElements_) { if (attributionKey in visibleAttributions) { if (!this.attributionElementRenderedVisible_[attributionKey]) { - goog.style.setElementShown( - this.attributionElements_[attributionKey], true); + this.attributionElements_[attributionKey].style.display = ''; // Show the element this.attributionElementRenderedVisible_[attributionKey] = true; } delete visibleAttributions[attributionKey]; } else if (attributionKey in hiddenAttributions) { if (this.attributionElementRenderedVisible_[attributionKey]) { - goog.style.setElementShown( - this.attributionElements_[attributionKey], false); + this.attributionElements_[attributionKey].style.display = 'none'; //Hide the element delete this.attributionElementRenderedVisible_[attributionKey]; } delete hiddenAttributions[attributionKey]; @@ -260,7 +257,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { attributionElement = document.createElement('LI'); attributionElement.innerHTML = hiddenAttributions[attributionKey].getHTML(); - goog.style.setElementShown(attributionElement, false); + attributionElement.style.display = 'none'; //Hide the element this.ulElement_.appendChild(attributionElement); this.attributionElements_[attributionKey] = attributionElement; } @@ -269,7 +266,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { !ol.object.isEmpty(this.attributionElementRenderedVisible_) || !ol.object.isEmpty(frameState.logos); if (this.renderedVisible_ != renderVisible) { - goog.style.setElementShown(this.element, renderVisible); + this.element.style.display = renderVisible ? '' : 'none'; //Conditionally hide this.renderedVisible_ = renderVisible; } if (renderVisible && @@ -324,7 +321,7 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) { } } - goog.style.setElementShown(this.logoLi_, !ol.object.isEmpty(logos)); + this.logoLi_.style.display = !ol.object.isEmpty(logos) ? '' : 'none'; }; diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index 6a9f05b528..4226e8204a 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -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; } diff --git a/src/ol/overlay.js b/src/ol/overlay.js index f3bf46e6d1..cc2ae8b5c0 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -469,7 +469,7 @@ ol.Overlay.prototype.setPositioning = function(positioning) { */ ol.Overlay.prototype.setVisible = function(visible) { if (this.rendered_.visible !== visible) { - goog.style.setElementShown(this.element_, visible); + this.element_.style.display = visible ? '' : 'none'; this.rendered_.visible = visible; } }; diff --git a/src/ol/renderer/canvas/canvasmaprenderer.js b/src/ol/renderer/canvas/canvasmaprenderer.js index b8fed0b31f..92bf736f75 100644 --- a/src/ol/renderer/canvas/canvasmaprenderer.js +++ b/src/ol/renderer/canvas/canvasmaprenderer.js @@ -4,7 +4,6 @@ goog.provide('ol.renderer.canvas.Map'); goog.require('goog.asserts'); goog.require('goog.dom'); -goog.require('goog.style'); goog.require('goog.vec.Mat4'); goog.require('ol'); goog.require('ol.RendererType'); @@ -149,7 +148,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) { if (!frameState) { if (this.renderedVisible_) { - goog.style.setElementShown(this.canvas_, false); + this.canvas_.style.display = 'none'; //Hide the element this.renderedVisible_ = false; } return; @@ -200,7 +199,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) { ol.render.EventType.POSTCOMPOSE, frameState); if (!this.renderedVisible_) { - goog.style.setElementShown(this.canvas_, true); + this.canvas_.style.display = ''; //Show the element this.renderedVisible_ = true; } diff --git a/src/ol/renderer/dom/dommaprenderer.js b/src/ol/renderer/dom/dommaprenderer.js index 01abf6dbc8..fdec6c236a 100644 --- a/src/ol/renderer/dom/dommaprenderer.js +++ b/src/ol/renderer/dom/dommaprenderer.js @@ -5,7 +5,6 @@ goog.require('goog.dom'); goog.require('ol.events'); goog.require('ol.events.Event'); goog.require('ol.events.EventType'); -goog.require('goog.style'); goog.require('goog.vec.Mat4'); goog.require('ol'); goog.require('ol.RendererType'); @@ -157,7 +156,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) { if (!frameState) { if (this.renderedVisible_) { - goog.style.setElementShown(this.layersPane_, false); + this.layersPane_.style.display = 'none'; //Hide the element this.renderedVisible_ = false; } return; @@ -209,7 +208,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) { } if (!this.renderedVisible_) { - goog.style.setElementShown(this.layersPane_, true); + this.layersPane_.style.display = ''; //Show the element this.renderedVisible_ = true; } diff --git a/src/ol/renderer/dom/domtilelayerrenderer.js b/src/ol/renderer/dom/domtilelayerrenderer.js index 7c2f6159ef..6ef9fb3001 100644 --- a/src/ol/renderer/dom/domtilelayerrenderer.js +++ b/src/ol/renderer/dom/domtilelayerrenderer.js @@ -5,7 +5,6 @@ goog.provide('ol.renderer.dom.TileLayer'); goog.require('goog.asserts'); goog.require('goog.dom'); -goog.require('goog.style'); goog.require('goog.vec.Mat4'); goog.require('ol'); goog.require('ol.TileRange'); @@ -77,7 +76,7 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerSta if (!layerState.visible) { if (this.renderedVisible_) { - goog.style.setElementShown(this.target, false); + this.target.style.display = 'none'; //Hide the element this.renderedVisible_ = false; } return true; @@ -246,7 +245,7 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerSta } if (layerState.visible && !this.renderedVisible_) { - goog.style.setElementShown(this.target, true); + this.target.style.display = ''; //Show the element this.renderedVisible_ = true; } diff --git a/src/ol/renderer/webgl/webglmaprenderer.js b/src/ol/renderer/webgl/webglmaprenderer.js index 9dc3fbd760..fdc382dc75 100644 --- a/src/ol/renderer/webgl/webglmaprenderer.js +++ b/src/ol/renderer/webgl/webglmaprenderer.js @@ -4,7 +4,6 @@ goog.provide('ol.renderer.webgl.Map'); goog.require('goog.asserts'); goog.require('goog.dom'); -goog.require('goog.style'); goog.require('goog.webgl'); goog.require('ol'); goog.require('ol.RendererType'); @@ -430,7 +429,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) { if (!frameState) { if (this.renderedVisible_) { - goog.style.setElementShown(this.canvas_, false); + this.canvas_.style.display = 'none'; //Hide the element this.renderedVisible_ = false; } return false; @@ -486,7 +485,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) { } if (!this.renderedVisible_) { - goog.style.setElementShown(this.canvas_, true); + this.canvas_.style.display = ''; //Show the element this.renderedVisible_ = true; }