Use goog.style.getContentBoxSize to calculate map size

This takes into account any border.
This commit is contained in:
Tom Payne
2014-01-02 16:49:08 +01:00
parent bd35cd89e6
commit 9ea44d10ce

View File

@@ -1212,7 +1212,7 @@ ol.Map.prototype.updateSize = function() {
if (goog.isNull(targetElement)) {
this.setSize(undefined);
} else {
var size = goog.style.getSize(targetElement);
var size = goog.style.getContentBoxSize(targetElement);
this.setSize([size.width, size.height]);
}
};