Caching array length instead of accessing it with each iteration. r=crschmidt (closes #1636)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7627 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -271,7 +271,7 @@ OpenLayers.Control.MouseToolbar = OpenLayers.Class(
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation);
|
||||
}
|
||||
if (this.mode == "measure" && mode != "measure") {
|
||||
for(var i = 0; i < this.measureDivs.length; i++) {
|
||||
for(var i=0, len=this.measureDivs.length; i<len; i++) {
|
||||
if (this.measureDivs[i]) {
|
||||
this.map.layerContainerDiv.removeChild(this.measureDivs[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user