Small patch to allow an 'id' property to be custom-set on controls -- without being overrided by the default random id generator. Thanks to Stephen I for the bug report. r=elemoine (Closes #1687)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@7829 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2008-08-22 13:23:16 +00:00
parent 52a5173326
commit afecf46652
2 changed files with 9 additions and 2 deletions

View File

@@ -176,7 +176,9 @@ OpenLayers.Control = OpenLayers.Class({
if(this.eventListeners instanceof Object) {
this.events.on(this.eventListeners);
}
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
if (this.id == null) {
this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
}
},
/**