no reason for Popup to be using an OpenLayers construct in the declaration phase. make it WIDTH and HEIGHT instead of using OpenLayers.Size.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@338 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
OpenLayers.Popup = Class.create();
|
OpenLayers.Popup = Class.create();
|
||||||
|
|
||||||
OpenLayers.Popup.count = 0;
|
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.COLOR = "white";
|
||||||
OpenLayers.Popup.OPACITY = 1;
|
OpenLayers.Popup.OPACITY = 1;
|
||||||
OpenLayers.Popup.BORDER = "0px";
|
OpenLayers.Popup.BORDER = "0px";
|
||||||
@@ -53,7 +54,10 @@ OpenLayers.Popup.prototype = {
|
|||||||
OpenLayers.Popup.count += 1;
|
OpenLayers.Popup.count += 1;
|
||||||
this.id = (id != null) ? id : "Popup" + OpenLayers.Popup.count;
|
this.id = (id != null) ? id : "Popup" + OpenLayers.Popup.count;
|
||||||
this.lonlat = lonlat;
|
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) {
|
if (contentHTML != null) {
|
||||||
this.contentHTML = contentHTML;
|
this.contentHTML = contentHTML;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
t.ok( popup instanceof OpenLayers.Popup, "new OpenLayers.Popup returns Popup object" );
|
||||||
t.ok(popup.id.startsWith("Popup"), "good default popup.id");
|
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.w, OpenLayers.Popup.WIDTH, "good default popup.size.w");
|
||||||
t.eq(popup.size.h, OpenLayers.Popup.SIZE.h, "good default popup.size.h");
|
t.eq(popup.size.h, OpenLayers.Popup.HEIGHT, "good default popup.size.h");
|
||||||
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
|
t.eq(popup.contentHTML, "", "good default popup.contentHTML");
|
||||||
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
|
t.eq(popup.backgroundColor, OpenLayers.Popup.COLOR, "good default popup.backgroundColor");
|
||||||
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
|
t.eq(popup.opacity, OpenLayers.Popup.OPACITY, "good default popup.opacity");
|
||||||
|
|||||||
Reference in New Issue
Block a user