OpenLayers OpenLayers

Changeset 7597

Show
Ignore:
Timestamp:
07/29/08 19:40:32 (4 months ago)
Author:
crschmidt
Message:

Redraw control.panel when toggle controls are activated. Patch by
sbenthall (yay), r=me, (Closes #895)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/Panel.js

    r6833 r7597  
    138138        if (control.type == OpenLayers.Control.TYPE_BUTTON) { 
    139139            control.trigger(); 
     140            this.redraw(); 
    140141            return; 
    141142        } 
     
    146147                control.activate(); 
    147148            } 
     149            this.redraw(); 
    148150            return; 
    149151        } 
  • trunk/openlayers/tests/Control/Panel.html

    r6724 r7597  
    1111    } 
    1212    function test_Control_Panel_constructor (t) { 
    13         t.plan(5); 
     13        t.plan(6); 
    1414        var map = new OpenLayers.Map('map'); 
    1515        var panel = new OpenLayers.Control.Panel(); 
     
    3838        t.ok(toolControl.active && !anotherToolControl.active && !toggleControl.active, 
    3939              "activated one tool control, the other one is inactive and the toggle control also."); 
     40 
     41        panel.redraw = function(){ 
     42            t.ok(true,"Redraw called on activated toggle"); 
     43        } 
    4044               
    4145        panel.activateControl(toggleControl);