From 46d16ba0ca671a63d01fbea4878deb0e17305b6c Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 22 Jul 2013 17:09:54 +0200 Subject: [PATCH] Use setElementShown instead of showElement --- src/ol/control/attributioncontrol.js | 11 ++++++----- src/ol/control/logocontrol.js | 4 ++-- src/ol/control/scalelinecontrol.js | 4 ++-- src/ol/overlay.js | 4 ++-- src/ol/renderer/canvas/canvasmaprenderer.js | 4 ++-- src/ol/renderer/dom/dommaprenderer.js | 4 ++-- src/ol/renderer/dom/domtilelayerrenderer.js | 4 ++-- src/ol/renderer/webgl/webglmaprenderer.js | 4 ++-- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/ol/control/attributioncontrol.js b/src/ol/control/attributioncontrol.js index 617c2b7904..e3bd74f6d7 100644 --- a/src/ol/control/attributioncontrol.js +++ b/src/ol/control/attributioncontrol.js @@ -126,7 +126,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { if (goog.isNull(frameState)) { if (this.renderedVisible_) { - goog.style.showElement(this.element, false); + goog.style.setElementShown(this.element, false); this.renderedVisible_ = false; } return; @@ -142,14 +142,15 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { for (attributionKey in this.attributionElements_) { if (attributionKey in visibleAttributions) { if (!this.attributionElementRenderedVisible_[attributionKey]) { - goog.style.showElement(this.attributionElements_[attributionKey], true); + goog.style.setElementShown( + this.attributionElements_[attributionKey], true); this.attributionElementRenderedVisible_[attributionKey] = true; } delete visibleAttributions[attributionKey]; } else if (attributionKey in hiddenAttributions) { if (this.attributionElementRenderedVisible_[attributionKey]) { - goog.style.showElement( + goog.style.setElementShown( this.attributionElements_[attributionKey], false); delete this.attributionElementRenderedVisible_[attributionKey]; } @@ -173,7 +174,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { attributionElement = goog.dom.createElement(goog.dom.TagName.LI); attributionElement.innerHTML = hiddenAttributions[attributionKey].getHTML(); - goog.style.showElement(attributionElement, false); + goog.style.setElementShown(attributionElement, false); goog.dom.appendChild(this.ulElement_, attributionElement); this.attributionElements_[attributionKey] = attributionElement; } @@ -181,7 +182,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) { var renderVisible = !goog.object.isEmpty(this.attributionElementRenderedVisible_); if (this.renderedVisible_ != renderVisible) { - goog.style.showElement(this.element, renderVisible); + goog.style.setElementShown(this.element, renderVisible); this.renderedVisible_ = renderVisible; } diff --git a/src/ol/control/logocontrol.js b/src/ol/control/logocontrol.js index 6237d4bed1..b3ce8f0de1 100644 --- a/src/ol/control/logocontrol.js +++ b/src/ol/control/logocontrol.js @@ -73,7 +73,7 @@ ol.control.Logo.prototype.updateElement_ = function(frameState) { if (goog.isNull(frameState)) { if (this.renderedVisible_) { - goog.style.showElement(this.element, false); + goog.style.setElementShown(this.element, false); this.renderedVisible_ = false; } return; @@ -104,7 +104,7 @@ ol.control.Logo.prototype.updateElement_ = function(frameState) { var renderVisible = !goog.object.isEmpty(logos); if (this.renderedVisible_ != renderVisible) { - goog.style.showElement(this.element, renderVisible); + goog.style.setElementShown(this.element, renderVisible); this.renderedVisible_ = renderVisible; } diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index 3e2af66005..0209806472 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -194,7 +194,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() { if (goog.isNull(view2DState)) { if (this.renderedVisible_) { - goog.style.showElement(this.element_, false); + goog.style.setElementShown(this.element_, false); this.renderedVisible_ = false; } return; @@ -322,7 +322,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() { } if (!this.renderedVisible_) { - goog.style.showElement(this.element_, true); + goog.style.setElementShown(this.element_, true); this.renderedVisible_ = true; } diff --git a/src/ol/overlay.js b/src/ol/overlay.js index d3a955f4f2..49f5468baf 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -280,7 +280,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() { var position = this.getPosition(); if (!goog.isDef(map) || !map.isDef() || !goog.isDef(position)) { if (this.rendered_.visible) { - goog.style.showElement(this.element_, false); + goog.style.setElementShown(this.element_, false); this.rendered_.visible = false; } return; @@ -329,7 +329,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() { } if (!this.rendered_.visible) { - goog.style.showElement(this.element_, true); + goog.style.setElementShown(this.element_, true); this.rendered_.visible = true; } diff --git a/src/ol/renderer/canvas/canvasmaprenderer.js b/src/ol/renderer/canvas/canvasmaprenderer.js index 3849cff227..a0254f968a 100644 --- a/src/ol/renderer/canvas/canvasmaprenderer.js +++ b/src/ol/renderer/canvas/canvasmaprenderer.js @@ -94,7 +94,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) { if (goog.isNull(frameState)) { if (this.renderedVisible_) { - goog.style.showElement(this.canvas_, false); + goog.style.setElementShown(this.canvas_, false); this.renderedVisible_ = false; } return; @@ -156,7 +156,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) { } if (!this.renderedVisible_) { - goog.style.showElement(this.canvas_, true); + goog.style.setElementShown(this.canvas_, true); this.renderedVisible_ = true; } diff --git a/src/ol/renderer/dom/dommaprenderer.js b/src/ol/renderer/dom/dommaprenderer.js index f231b6bedc..5236571ffc 100644 --- a/src/ol/renderer/dom/dommaprenderer.js +++ b/src/ol/renderer/dom/dommaprenderer.js @@ -71,7 +71,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) { if (goog.isNull(frameState)) { if (this.renderedVisible_) { - goog.style.showElement(this.layersPane_, false); + goog.style.setElementShown(this.layersPane_, false); this.renderedVisible_ = false; } return; @@ -98,7 +98,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) { } if (!this.renderedVisible_) { - goog.style.showElement(this.layersPane_, true); + goog.style.setElementShown(this.layersPane_, true); this.renderedVisible_ = true; } diff --git a/src/ol/renderer/dom/domtilelayerrenderer.js b/src/ol/renderer/dom/domtilelayerrenderer.js index 37310229ea..9eb83fcad1 100644 --- a/src/ol/renderer/dom/domtilelayerrenderer.js +++ b/src/ol/renderer/dom/domtilelayerrenderer.js @@ -76,7 +76,7 @@ ol.renderer.dom.TileLayer.prototype.renderFrame = if (!layerState.visible) { if (this.renderedVisible_) { - goog.style.showElement(this.target, false); + goog.style.setElementShown(this.target, false); this.renderedVisible_ = false; } return; @@ -226,7 +226,7 @@ ol.renderer.dom.TileLayer.prototype.renderFrame = } if (layerState.visible && !this.renderedVisible_) { - goog.style.showElement(this.target, true); + goog.style.setElementShown(this.target, true); this.renderedVisible_ = true; } diff --git a/src/ol/renderer/webgl/webglmaprenderer.js b/src/ol/renderer/webgl/webglmaprenderer.js index d250365299..cf223ff6e5 100644 --- a/src/ol/renderer/webgl/webglmaprenderer.js +++ b/src/ol/renderer/webgl/webglmaprenderer.js @@ -538,7 +538,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) { if (goog.isNull(frameState)) { if (this.renderedVisible_) { - goog.style.showElement(this.canvas_, false); + goog.style.setElementShown(this.canvas_, false); this.renderedVisible_ = false; } return false; @@ -651,7 +651,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) { } if (!this.renderedVisible_) { - goog.style.showElement(this.canvas_, true); + goog.style.setElementShown(this.canvas_, true); this.renderedVisible_ = true; }