Uncollapse when there’s only logos

This commit is contained in:
Antoine Abt
2014-07-21 14:38:26 +02:00
parent a71714e8b6
commit a43c546667
2 changed files with 16 additions and 0 deletions

View File

@@ -272,6 +272,12 @@ ol.control.Attribution.prototype.updateElement_ = function(frameState) {
goog.style.setElementShown(this.element, renderVisible);
this.renderedVisible_ = renderVisible;
}
if (renderVisible &&
goog.object.isEmpty(this.attributionElementRenderedVisible_)) {
goog.dom.classlist.add(this.element, 'ol-logo-only');
} else {
goog.dom.classlist.remove(this.element, 'ol-logo-only');
}
this.insertLogos_(frameState);