Don't pass an object to goog.dom.createDom for the class name

If the second argument to goog.dom.createDom is a string, then this is
the className of the new element.
This commit is contained in:
Frederic Junod
2014-10-30 12:20:09 +01:00
parent 2d53eb7667
commit 6ca1640659
5 changed files with 18 additions and 23 deletions

View File

@@ -111,12 +111,12 @@ ol.control.Attribution = function(opt_options) {
this.blur();
}, false);
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
ol.css.CLASS_CONTROL +
(this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
(this.collapsible_ ? '' : ' ol-uncollapsible')
}, this.ulElement_, button);
var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
ol.css.CLASS_CONTROL +
(this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
(this.collapsible_ ? '' : ' ol-uncollapsible');
var element = goog.dom.createDom(goog.dom.TagName.DIV,
cssClasses, this.ulElement_, button);
goog.base(this, {
element: element,