move Popup to the same design as Marker. Create the div in the constructor. Give popup an events object.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@416 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-27 01:08:00 +00:00
parent 3691bc54b6
commit f08462465d

View File

@@ -12,6 +12,9 @@ OpenLayers.Popup.BORDER = "0px";
OpenLayers.Popup.prototype = {
/** @type OpenLayers.Events*/
events: null,
/** @type String */
id: "",
@@ -62,6 +65,11 @@ OpenLayers.Popup.prototype = {
this.backgroundColor = OpenLayers.Popup.COLOR;
this.opacity = OpenLayers.Popup.OPACITY;
this.border = OpenLayers.Popup.BORDER;
this.div = OpenLayers.Util.createDiv(this.id + "_div", null, null,
null, null, null, "hidden");
this.events = new OpenLayers.Events(this, this.div, null);
},
/**
@@ -87,10 +95,6 @@ OpenLayers.Popup.prototype = {
}
}
if (this.div == null) {
this.div = OpenLayers.Util.createDiv(this.id + "_div", null, null,
null, null, null, "hidden");
}
this.setSize();
this.setBackgroundColor();
this.setOpacity();