Add className option to ol.control.Attribution
This commit is contained in:
@@ -104,6 +104,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.AttributionOptions
|
* @typedef {Object} ol.control.AttributionOptions
|
||||||
|
* @property {string|undefined} className Class name.
|
||||||
* @property {ol.Map|undefined} map Map.
|
* @property {ol.Map|undefined} map Map.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -32,8 +32,10 @@ ol.control.Attribution = function(opt_options) {
|
|||||||
*/
|
*/
|
||||||
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
|
this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
|
||||||
|
|
||||||
|
var className = goog.isDef(options.className) ?
|
||||||
|
options.className : 'ol-attribution';
|
||||||
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
|
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
|
||||||
'class': 'ol-attribution ' + ol.css.CLASS_UNSELECTABLE
|
'class': className + ' ' + ol.css.CLASS_UNSELECTABLE
|
||||||
}, this.ulElement_);
|
}, this.ulElement_);
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
|
|||||||
Reference in New Issue
Block a user