Make attribution control less ugly
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user