Make attribution control less ugly

This commit is contained in:
Tom Payne
2012-09-28 14:53:31 +02:00
parent 1be9e97489
commit ed67bdc489
2 changed files with 13 additions and 4 deletions

View File

@@ -15,6 +15,13 @@
color: white; color: white;
text-decoration: none; text-decoration: none;
} }
.ol-attribution li {
display: inline;
list-style: none;
}
.ol-attribution li {
display: inline;
}
.ol-dragbox { .ol-dragbox {
position: absolute; position: absolute;
border: 2px solid red; border: 2px solid red;

View File

@@ -36,9 +36,11 @@ ol.control.AttributionOptions;
*/ */
ol.control.Attribution = function(attributionOptions) { ol.control.Attribution = function(attributionOptions) {
var element = goog.dom.createDom(goog.dom.TagName.UL, { this.ulElement_ = goog.dom.createElement(goog.dom.TagName.UL);
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
'class': 'ol-attribution' 'class': 'ol-attribution'
}); }, this.ulElement_);
/** /**
* @private * @private
@@ -136,7 +138,7 @@ ol.control.Attribution.prototype.createAttributionElementsForLayer_ =
var attributionKey = goog.getUid(attribution); var attributionKey = goog.getUid(attribution);
var attributionElement = goog.dom.createElement(goog.dom.TagName.LI); var attributionElement = goog.dom.createElement(goog.dom.TagName.LI);
attributionElement.innerHTML = attribution.getHtml(); attributionElement.innerHTML = attribution.getHtml() + ' ';
if (!map.isDef || if (!map.isDef ||
!layerVisible || !layerVisible ||
@@ -145,7 +147,7 @@ ol.control.Attribution.prototype.createAttributionElementsForLayer_ =
goog.style.showElement(attributionElement, false); goog.style.showElement(attributionElement, false);
} }
goog.dom.appendChild(this.element, attributionElement); goog.dom.appendChild(this.ulElement_, attributionElement);
this.attributionElements_[attributionKey] = attributionElement; this.attributionElements_[attributionKey] = attributionElement;