Use goog.dom functions
This commit is contained in:
@@ -10,6 +10,7 @@ goog.provide('ol.MapProperty');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.dispose');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.ViewportSizeMonitor');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.BrowserEvent');
|
||||
@@ -119,7 +120,7 @@ ol.Map = function(target, opt_values, opt_viewportSizeMonitor) {
|
||||
this.eventsPane_.style.width = '100%';
|
||||
this.eventsPane_.style.height = '100%';
|
||||
this.eventsPane_.style.zIndex = ol.MapPaneZIndex.EVENTS;
|
||||
target.appendChild(this.eventsPane_);
|
||||
goog.dom.appendChild(target, this.eventsPane_);
|
||||
|
||||
goog.events.listen(this.eventsPane_, [
|
||||
goog.events.EventType.DBLCLICK
|
||||
|
||||
@@ -31,7 +31,7 @@ ol.dom.Map = function(target, opt_values) {
|
||||
this.viewport_.style.overflow = 'hidden';
|
||||
this.viewport_.style.width = '100%';
|
||||
this.viewport_.style.height = '100%';
|
||||
target.appendChild(this.viewport_);
|
||||
goog.dom.appendChild(target, this.viewport_);
|
||||
|
||||
/**
|
||||
* @type {!Element}
|
||||
@@ -40,7 +40,7 @@ ol.dom.Map = function(target, opt_values) {
|
||||
this.layersPane_ = goog.dom.createElement(goog.dom.TagName.DIV);
|
||||
this.layersPane_.className = 'ol-layers-pane';
|
||||
this.layersPane_.style.position = 'absolute';
|
||||
this.viewport_.appendChild(this.layersPane_);
|
||||
goog.dom.appendChild(this.viewport_, this.layersPane_);
|
||||
|
||||
/**
|
||||
* @type {Object}
|
||||
@@ -136,7 +136,7 @@ ol.dom.Map.prototype.createLayerRenderer = function(layer) {
|
||||
var layerPane = goog.dom.createElement(goog.dom.TagName.DIV);
|
||||
layerPane.className = 'ol-layer';
|
||||
layerPane.style.position = 'absolute';
|
||||
this.layersPane_.appendChild(layerPane);
|
||||
goog.dom.appendChild(this.layersPane_, layerPane);
|
||||
|
||||
var layerRenderer = new ol.dom.TileLayerRenderer(this, layer, layerPane);
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ ol.dom.TileLayerRenderer.prototype.render = function() {
|
||||
}, this);
|
||||
|
||||
if (newTiles) {
|
||||
this.target.appendChild(fragment);
|
||||
goog.dom.appendChild(this.target, fragment);
|
||||
}
|
||||
|
||||
this.removeInvisibleTiles_(tileBounds, z);
|
||||
@@ -147,7 +147,7 @@ ol.dom.TileLayerRenderer.prototype.removeInvisibleTiles_ = function(
|
||||
if (prune) {
|
||||
tile = this.renderedTiles_[key];
|
||||
delete this.renderedTiles_[key];
|
||||
this.target.removeChild(tile.getImage(this));
|
||||
goog.dom.removeNode(tile.getImage(this));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -144,7 +144,7 @@ ol.webgl.Map = function(target, opt_values) {
|
||||
this.canvas_.height = target.clientHeight;
|
||||
this.canvas_.width = target.clientWidth;
|
||||
this.canvas_.style.overflow = 'hidden';
|
||||
target.appendChild(this.canvas_);
|
||||
goog.dom.appendChild(target, this.canvas_);
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user