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
@@ -315,6 +315,10 @@ ol.renderer.dom.TileLayerZ_.prototype.addTile = function(tile) {
var tileSize = this.tileGrid_.getTileSize(tileCoord.z);
var image = tile.getImage(this);
var style = image.style;
// Bootstrap sets the style max-width: 100% for all images, which breaks
// prevents the tile from being displayed in FireFox. Workaround by
// overriding the max-width style.
style.maxWidth = 'none';
style.position = 'absolute';
style.left =
((tileCoord.x - this.tileCoordOrigin_.x) * tileSize.width) + 'px';