diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 2b9c536273..839ce4674b 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -6,7 +6,8 @@ OpenLayers.Popup = Class.create(); OpenLayers.Popup.count = 0; -OpenLayers.Popup.SIZE = new OpenLayers.Size(200, 200); +OpenLayers.Popup.WIDTH = 200; +OpenLayers.Popup.HEIGHT = 200; OpenLayers.Popup.COLOR = "white"; OpenLayers.Popup.OPACITY = 1; OpenLayers.Popup.BORDER = "0px"; @@ -53,7 +54,10 @@ OpenLayers.Popup.prototype = { OpenLayers.Popup.count += 1; this.id = (id != null) ? id : "Popup" + OpenLayers.Popup.count; this.lonlat = lonlat; - this.size = (size != null) ? size : OpenLayers.Popup.SIZE; + this.size = (size != null) ? size + : new OpenLayers.Size( + OpenLayers.Popup.WIDTH, + OpenLayers.Popup.HEIGHT); if (contentHTML != null) { this.contentHTML = contentHTML; } diff --git a/tests/test_Popup.html b/tests/test_Popup.html index 9ac7b06ba5..e1a474a7a9 100644 --- a/tests/test_Popup.html +++ b/tests/test_Popup.html @@ -11,8 +11,8 @@ t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" ); t.ok(popup.id.startsWith("Popup"), "good default popup.id"); - t.eq(popup.size.w, OpenLayers.Popup.SIZE.w, "good default popup.size.w"); - t.eq(popup.size.h, OpenLayers.Popup.SIZE.h, "good default popup.size.h"); + t.eq(popup.size.w, OpenLayers.Popup.WIDTH, "good default popup.size.w"); + t.eq(popup.size.h, OpenLayers.Popup.HEIGHT, "good default popup.size.h"); t.eq(popup.contentHTML, "", "good default popup.contentHTML"); t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor"); t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");