OpenLayers OpenLayers

Changeset 1352

Show
Ignore:
Timestamp:
08/24/06 01:49:02 (2 years ago)
Author:
crschmidt
Message:

Because we've removed the ruler button, its image no longer needs changing
when we change modes to/from that mode. Remember that.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/openlayers/2.0/lib/OpenLayers/Control/MouseToolbar.js

    r1350 r1352  
    181181    switchModeTo: function(mode) { 
    182182        if (mode != this.mode) { 
    183             if (this.mode) { 
     183            if (this.mode && this.buttons[this.mode]) { 
    184184                OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation); 
    185185            } 
     
    194194            } 
    195195            this.mode = mode; 
    196             OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation); 
     196            if (this.buttons[mode]) { 
     197                OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation); 
     198            } 
    197199        }  
    198200    },