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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user