Remove use of goog.dom.createDom

This commit is contained in:
Frederic Junod
2016-02-15 16:20:52 +01:00
parent 34392b464c
commit 296ec9799f
5 changed files with 23 additions and 13 deletions

View File

@@ -2,7 +2,6 @@
goog.provide('ol.control.MousePosition');
goog.require('goog.dom');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.CoordinateFormatType');
@@ -40,10 +39,8 @@ ol.control.MousePosition = function(opt_options) {
var options = opt_options ? opt_options : {};
var className = options.className !== undefined ? options.className :
'ol-mouse-position';
var element = goog.dom.createDom('DIV', className);
var element = document.createElement('DIV');
element.className = options.className !== undefined ? options.className : 'ol-mouse-position'
var render = options.render ?
options.render : ol.control.MousePosition.render;

View File

@@ -86,7 +86,8 @@ ol.control.OverviewMap = function(opt_options) {
ol.events.listen(button, ol.events.EventType.CLICK,
this.handleClick_, this);
var ovmapDiv = goog.dom.createDom('DIV', 'ol-overviewmap-map');
var ovmapDiv = document.createElement('DIV');
ovmapDiv.className = 'ol-overviewmap-map';
/**
* @type {ol.Map}

View File

@@ -3,7 +3,6 @@ goog.provide('ol.control.ScaleLineProperty');
goog.provide('ol.control.ScaleLineUnits');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('ol.events');
goog.require('goog.style');
goog.require('ol');
@@ -61,14 +60,16 @@ ol.control.ScaleLine = function(opt_options) {
* @private
* @type {Element}
*/
this.innerElement_ = goog.dom.createDom('DIV', className + '-inner');
this.innerElement_ = document.createElement('DIV');
this.innerElement_.className = className + '-inner';
/**
* @private
* @type {Element}
*/
this.element_ = goog.dom.createDom('DIV',
className + ' ' + ol.css.CLASS_UNSELECTABLE, this.innerElement_);
this.element_ = document.createElement('DIV');
this.element_.className = className + ' ' + ol.css.CLASS_UNSELECTABLE;
this.element_.appendChild(this.innerElement_);
/**
* @private