Remove unneeded comments and use ol.global
This commit is contained in:
@@ -43,7 +43,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
this.logoLi_ = document.createElement('LI');
|
||||
|
||||
this.ulElement_.appendChild(this.logoLi_);
|
||||
this.logoLi_.style.display = 'none'; // Hide the logo
|
||||
this.logoLi_.style.display = 'none';
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -213,7 +213,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
|
||||
if (!frameState) {
|
||||
if (this.renderedVisible_) {
|
||||
this.element.style.display = 'none'; //Hide the element
|
||||
this.element.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
}
|
||||
return;
|
||||
@@ -229,13 +229,13 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
for (attributionKey in this.attributionElements_) {
|
||||
if (attributionKey in visibleAttributions) {
|
||||
if (!this.attributionElementRenderedVisible_[attributionKey]) {
|
||||
this.attributionElements_[attributionKey].style.display = ''; // Show the element
|
||||
this.attributionElements_[attributionKey].style.display = '';
|
||||
this.attributionElementRenderedVisible_[attributionKey] = true;
|
||||
}
|
||||
delete visibleAttributions[attributionKey];
|
||||
} else if (attributionKey in hiddenAttributions) {
|
||||
if (this.attributionElementRenderedVisible_[attributionKey]) {
|
||||
this.attributionElements_[attributionKey].style.display = 'none'; //Hide the element
|
||||
this.attributionElements_[attributionKey].style.display = 'none';
|
||||
delete this.attributionElementRenderedVisible_[attributionKey];
|
||||
}
|
||||
delete hiddenAttributions[attributionKey];
|
||||
@@ -257,7 +257,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
attributionElement = document.createElement('LI');
|
||||
attributionElement.innerHTML =
|
||||
hiddenAttributions[attributionKey].getHTML();
|
||||
attributionElement.style.display = 'none'; //Hide the element
|
||||
attributionElement.style.display = 'none';
|
||||
this.ulElement_.appendChild(attributionElement);
|
||||
this.attributionElements_[attributionKey] = attributionElement;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
!ol.object.isEmpty(this.attributionElementRenderedVisible_) ||
|
||||
!ol.object.isEmpty(frameState.logos);
|
||||
if (this.renderedVisible_ != renderVisible) {
|
||||
this.element.style.display = renderVisible ? '' : 'none'; //Conditionally hide
|
||||
this.element.style.display = renderVisible ? '' : 'none';
|
||||
this.renderedVisible_ = renderVisible;
|
||||
}
|
||||
if (renderVisible &&
|
||||
|
||||
@@ -257,7 +257,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
|
||||
Math.pow(10, Math.floor(i / 3));
|
||||
width = Math.round(count / pointResolution);
|
||||
if (isNaN(width)) {
|
||||
this.element_.style.display = 'none'; // Hide the element
|
||||
this.element_.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
return;
|
||||
} else if (width >= this.minWidth_) {
|
||||
@@ -278,7 +278,7 @@ ol.control.ScaleLine.prototype.updateElement_ = function() {
|
||||
}
|
||||
|
||||
if (!this.renderedVisible_) {
|
||||
this.element_.style.display = ''; //Show the element
|
||||
this.element_.style.display = '';
|
||||
this.renderedVisible_ = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -440,8 +440,8 @@ ol.Overlay.prototype.getRect_ = function(element, size) {
|
||||
goog.asserts.assert(size !== undefined, 'size should be defined');
|
||||
|
||||
var box = element.getBoundingClientRect();
|
||||
var offsetX = box.left + window.pageXOffset;
|
||||
var offsetY = box.top + window.pageYOffset;
|
||||
var offsetX = box.left + ol.global.pageXOffset;
|
||||
var offsetY = box.top + ol.global.pageYOffset;
|
||||
return [
|
||||
offsetX,
|
||||
offsetY,
|
||||
|
||||
@@ -148,7 +148,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
|
||||
|
||||
if (!frameState) {
|
||||
if (this.renderedVisible_) {
|
||||
this.canvas_.style.display = 'none'; //Hide the element
|
||||
this.canvas_.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
}
|
||||
return;
|
||||
@@ -199,7 +199,7 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
|
||||
ol.render.EventType.POSTCOMPOSE, frameState);
|
||||
|
||||
if (!this.renderedVisible_) {
|
||||
this.canvas_.style.display = ''; //Show the element
|
||||
this.canvas_.style.display = '';
|
||||
this.renderedVisible_ = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) {
|
||||
|
||||
if (!frameState) {
|
||||
if (this.renderedVisible_) {
|
||||
this.layersPane_.style.display = 'none'; //Hide the element
|
||||
this.layersPane_.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
}
|
||||
return;
|
||||
@@ -208,7 +208,7 @@ ol.renderer.dom.Map.prototype.renderFrame = function(frameState) {
|
||||
}
|
||||
|
||||
if (!this.renderedVisible_) {
|
||||
this.layersPane_.style.display = ''; //Show the element
|
||||
this.layersPane_.style.display = '';
|
||||
this.renderedVisible_ = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerSta
|
||||
|
||||
if (!layerState.visible) {
|
||||
if (this.renderedVisible_) {
|
||||
this.target.style.display = 'none'; //Hide the element
|
||||
this.target.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
}
|
||||
return true;
|
||||
@@ -245,7 +245,7 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerSta
|
||||
}
|
||||
|
||||
if (layerState.visible && !this.renderedVisible_) {
|
||||
this.target.style.display = ''; //Show the element
|
||||
this.target.style.display = '';
|
||||
this.renderedVisible_ = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
|
||||
|
||||
if (!frameState) {
|
||||
if (this.renderedVisible_) {
|
||||
this.canvas_.style.display = 'none'; //Hide the element
|
||||
this.canvas_.style.display = 'none';
|
||||
this.renderedVisible_ = false;
|
||||
}
|
||||
return false;
|
||||
@@ -485,7 +485,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
|
||||
}
|
||||
|
||||
if (!this.renderedVisible_) {
|
||||
this.canvas_.style.display = ''; //Show the element
|
||||
this.canvas_.style.display = '';
|
||||
this.renderedVisible_ = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user