Use a loop variable to avoid array lookups and use one if clause instead of two. Non-functional change (see #2764)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -187,12 +187,12 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
this.redraw();
|
this.redraw();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var c;
|
||||||
for (var i=0, len=this.controls.length; i<len; i++) {
|
for (var i=0, len=this.controls.length; i<len; i++) {
|
||||||
if (this.controls[i] != control) {
|
c = this.controls[i];
|
||||||
if (this.controls[i].type === OpenLayers.Control.TYPE_TOOL ||
|
if (c != control &&
|
||||||
this.controls[i].type === null) {
|
(c.type === OpenLayers.Control.TYPE_TOOL || c.type == null)) {
|
||||||
this.controls[i].deactivate();
|
c.deactivate();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
control.activate();
|
control.activate();
|
||||||
|
|||||||
Reference in New Issue
Block a user