consolodate usage of Math.random() in OpenLayers.Util.createUniqueID()

git-svn-id: http://svn.openlayers.org/trunk/openlayers@971 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-18 16:23:12 +00:00
parent ab98af7635
commit c0e82d966f
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ OpenLayers.Feature.prototype= {
this.layer = layer;
this.lonlat = lonlat;
this.data = (data != null) ? data : new Object();
this.id = (id ? id : 'f' + Math.random());
this.id = (id != null) ? id : OpenLayers.Util.createUniqueID('f');
},
/**

View File

@@ -768,7 +768,7 @@ OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position,
//set generic properties
if (!id) {
id = "OpenLayersDiv" + Math.round(Math.random() * 10000);
id = OpenLayers.Util.createUniqueID("OpenLayersDiv");
}
if (!position) {
position = "absolute";
@@ -803,7 +803,7 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border) {
//set generic properties
if (!id) {
id = "OpenLayersDiv" + Math.round(Math.random() * 10000);
id = OpenLayers.Util.createUniqueID("OpenLayersDiv");
}
if (!position) {
position = "relative";