Prevent user's setting of max-width from infecting map

Thanks @ThomasG77.
This commit is contained in:
Tom Payne
2013-04-28 16:30:38 +02:00
parent 66d95316f1
commit daa975d01f
2 changed files with 8 additions and 0 deletions

View File

@@ -104,6 +104,10 @@ ol.renderer.dom.ImageLayer.prototype.renderFrame =
0);
if (image != this.image_) {
var imageElement = image.getImageElement(this);
// Bootstrap sets the style max-width: 100% for all images, which breaks
// prevents the image from being displayed in FireFox. Workaround by
// overriding the max-width style.
imageElement.style.maxWidth = 'none';
imageElement.style.position = 'absolute';
goog.dom.removeChildren(this.target);
goog.dom.appendChild(this.target, imageElement);