Remove usage of goog.dom.TagName enum
This commit is contained in:
@@ -4,7 +4,6 @@ goog.provide('ol.control.Attribution');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.TagName');
|
||||
goog.require('goog.dom.classlist');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
@@ -38,13 +37,13 @@ ol.control.Attribution = function(opt_options) {
|
||||
* @private
|
||||
* @type {Element}
|
||||
*/
|
||||
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
|
||||
this.ulElement_ = goog.dom.createElement('UL');
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Element}
|
||||
*/
|
||||
this.logoLi_ = goog.dom.createElement(goog.dom.TagName.LI);
|
||||
this.logoLi_ = goog.dom.createElement('LI');
|
||||
|
||||
this.ulElement_.appendChild(this.logoLi_);
|
||||
goog.style.setElementShown(this.logoLi_, false);
|
||||
@@ -77,7 +76,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
* @type {Node}
|
||||
*/
|
||||
this.collapseLabel_ = goog.isString(collapseLabel) ?
|
||||
goog.dom.createDom(goog.dom.TagName.SPAN, {}, collapseLabel) :
|
||||
goog.dom.createDom('SPAN', {}, collapseLabel) :
|
||||
collapseLabel;
|
||||
|
||||
var label = options.label ? options.label : 'i';
|
||||
@@ -87,12 +86,12 @@ ol.control.Attribution = function(opt_options) {
|
||||
* @type {Node}
|
||||
*/
|
||||
this.label_ = goog.isString(label) ?
|
||||
goog.dom.createDom(goog.dom.TagName.SPAN, {}, label) :
|
||||
goog.dom.createDom('SPAN', {}, label) :
|
||||
label;
|
||||
|
||||
var activeLabel = (this.collapsible_ && !this.collapsed_) ?
|
||||
this.collapseLabel_ : this.label_;
|
||||
var button = goog.dom.createDom(goog.dom.TagName.BUTTON, {
|
||||
var button = goog.dom.createDom('BUTTON', {
|
||||
'type': 'button',
|
||||
'title': tipLabel
|
||||
}, activeLabel);
|
||||
@@ -111,7 +110,7 @@ ol.control.Attribution = function(opt_options) {
|
||||
ol.css.CLASS_CONTROL +
|
||||
(this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
|
||||
(this.collapsible_ ? '' : ' ol-uncollapsible');
|
||||
var element = goog.dom.createDom(goog.dom.TagName.DIV,
|
||||
var element = goog.dom.createDom('DIV',
|
||||
cssClasses, this.ulElement_, button);
|
||||
|
||||
var render = options.render ? options.render : ol.control.Attribution.render;
|
||||
@@ -262,7 +261,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
}
|
||||
}
|
||||
for (attributionKey in visibleAttributions) {
|
||||
attributionElement = goog.dom.createElement(goog.dom.TagName.LI);
|
||||
attributionElement = goog.dom.createElement('LI');
|
||||
attributionElement.innerHTML =
|
||||
visibleAttributions[attributionKey].getHTML();
|
||||
this.ulElement_.appendChild(attributionElement);
|
||||
@@ -270,7 +269,7 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
|
||||
this.attributionElementRenderedVisible_[attributionKey] = true;
|
||||
}
|
||||
for (attributionKey in hiddenAttributions) {
|
||||
attributionElement = goog.dom.createElement(goog.dom.TagName.LI);
|
||||
attributionElement = goog.dom.createElement('LI');
|
||||
attributionElement.innerHTML =
|
||||
hiddenAttributions[attributionKey].getHTML();
|
||||
goog.style.setElementShown(attributionElement, false);
|
||||
@@ -323,7 +322,7 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
|
||||
if (logoValue === '') {
|
||||
logoElement = image;
|
||||
} else {
|
||||
logoElement = goog.dom.createDom(goog.dom.TagName.A, {
|
||||
logoElement = goog.dom.createDom('A', {
|
||||
'href': logoValue
|
||||
});
|
||||
logoElement.appendChild(image);
|
||||
|
||||
Reference in New Issue
Block a user