Because we've removed the ruler button, its image no longer needs changing
when we change modes to/from that mode. Remember that. git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1352 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -180,7 +180,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
|
||||
switchModeTo: function(mode) {
|
||||
if (mode != this.mode) {
|
||||
if (this.mode) {
|
||||
if (this.mode && this.buttons[this.mode]) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation);
|
||||
}
|
||||
if (this.mode == "measure" && mode != "measure") {
|
||||
@@ -193,7 +193,9 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.measureStart = null;
|
||||
}
|
||||
this.mode = mode;
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation);
|
||||
if (this.buttons[mode]) {
|
||||
OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user