From 9ea44d10ce387b2544e6abaf1bcebb566ebbf566 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 2 Jan 2014 16:49:08 +0100 Subject: [PATCH] Use goog.style.getContentBoxSize to calculate map size This takes into account any border. --- src/ol/map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/map.js b/src/ol/map.js index 262cadb2a8..2a3b6e4019 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -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]); } };