step toward standardization of id policy... for popups

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1416 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-09-08 04:51:32 +00:00
parent 31692f51fe
commit 899101ef0b
2 changed files with 9 additions and 9 deletions
+5 -3
View File
@@ -7,7 +7,6 @@
*/
OpenLayers.Popup = Class.create();
OpenLayers.Popup.count = 0;
OpenLayers.Popup.WIDTH = 200;
OpenLayers.Popup.HEIGHT = 200;
OpenLayers.Popup.COLOR = "white";
@@ -56,8 +55,11 @@ OpenLayers.Popup.prototype = {
* @param {String} contentHTML
*/
initialize:function(id, lonlat, size, contentHTML) {
OpenLayers.Popup.count += 1;
this.id = (id != null) ? id : "Popup" + OpenLayers.Popup.count;
if (id == null) {
id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
}
this.id = id;
this.lonlat = lonlat;
this.size = (size != null) ? size
: new OpenLayers.Size(