make popup take arguments, allow it to draw itself. tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,15 +4,50 @@
|
||||
OpenLayers.Popup = Class.create();
|
||||
OpenLayers.Popup.prototype = {
|
||||
|
||||
|
||||
/** @type String */
|
||||
id: "",
|
||||
|
||||
/** @type DOMElement */
|
||||
div: null,
|
||||
|
||||
/** @type OpenLayers.Pixel */
|
||||
px: null,
|
||||
|
||||
/** @type OpenLayers.Size*/
|
||||
size: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {String} id
|
||||
* @param {OpenLayers.Pixel} px
|
||||
* @param {OpenLayers.Size} size
|
||||
*/
|
||||
initialize:function() {
|
||||
initialize:function(id, px, size) {
|
||||
this.id = id;
|
||||
this.px = px;
|
||||
this.size = size;
|
||||
},
|
||||
|
||||
/**
|
||||
*/
|
||||
destroy: function() {
|
||||
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
draw: function() {
|
||||
if (this.div == null) {
|
||||
this.div = OpenLayers.Util.createDiv(this.id + "_div",
|
||||
this.px,
|
||||
this.size
|
||||
);
|
||||
|
||||
this.div.style.backgroundColor = "red";
|
||||
}
|
||||
return this.div;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user