Remove use of goog.dom.appendChild

Use `parent.appendChild(child)` instead.
This commit is contained in:
Frederic Junod
2015-10-01 12:06:35 +02:00
parent e5397cbfca
commit 9b6ad1b36f
6 changed files with 14 additions and 14 deletions
+4 -4
View File
@@ -46,7 +46,7 @@ ol.control.Attribution = function(opt_options) {
*/
this.logoLi_ = goog.dom.createElement(goog.dom.TagName.LI);
goog.dom.appendChild(this.ulElement_, this.logoLi_);
this.ulElement_.appendChild(this.logoLi_);
goog.style.setElementShown(this.logoLi_, false);
/**
@@ -265,7 +265,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
attributionElement = goog.dom.createElement(goog.dom.TagName.LI);
attributionElement.innerHTML =
visibleAttributions[attributionKey].getHTML();
goog.dom.appendChild(this.ulElement_, attributionElement);
this.ulElement_.appendChild(attributionElement);
this.attributionElements_[attributionKey] = attributionElement;
this.attributionElementRenderedVisible_[attributionKey] = true;
}
@@ -274,7 +274,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
attributionElement.innerHTML =
hiddenAttributions[attributionKey].getHTML();
goog.style.setElementShown(attributionElement, false);
goog.dom.appendChild(this.ulElement_, attributionElement);
this.ulElement_.appendChild(attributionElement);
this.attributionElements_[attributionKey] = attributionElement;
}
@@ -328,7 +328,7 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
});
logoElement.appendChild(image);
}
goog.dom.appendChild(this.logoLi_, logoElement);
this.logoLi_.appendChild(logoElement);
logoElements[logoKey] = logoElement;
}
}
+1 -1
View File
@@ -116,7 +116,7 @@ ol.control.Control.prototype.setMap = function(map) {
if (this.map_) {
var target = this.target_ ?
this.target_ : map.getOverlayContainerStopEvent();
goog.dom.appendChild(target, this.element);
target.appendChild(this.element);
if (this.render !== ol.nullFunction) {
this.listenerKeys.push(goog.events.listen(map,
ol.MapEventType.POSTRENDER, this.render, false, this));