From e658877014d82d81b6e1cf2779f273500a3c3ff3 Mon Sep 17 00:00:00 2001 From: euzuro Date: Tue, 26 Sep 2006 23:54:59 +0000 Subject: [PATCH] return a copy of the mapsize, not the mapsize itself. this will hopefully prevent some nasty bugs. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1504 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Map.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 22ee39810f..9895278124 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -458,7 +458,11 @@ OpenLayers.Map.prototype = { * @returns {OpenLayers.Size} */ getSize: function () { - return this.size; + var size = null; + if (this.size != null) { + size = this.size.clone(); + } + return size; }, /**