[OpenLayers-Trac] [OpenLayers] #3296: Restore old highlight on unhighlight

OpenLayers trac-20090302 at openlayers.org
Tue May 10 03:22:50 EDT 2011


#3296: Restore old highlight on unhighlight
-----------------------------------+----------------------------------------
 Reporter:  mosesonline            |       Owner:  tschaub     
     Type:  bug                    |      Status:  new         
 Priority:  minor                  |   Milestone:  2.12 Release
Component:  Control.SelectFeature  |     Version:  SVN         
 Keywords:                         |       State:  Review      
-----------------------------------+----------------------------------------
 In case of multiple SelectFeature controls the unhighlight function
 doesn't reset the last style, but the default style unlike the outFeature
 function.[[BR]]
 '''Reproduce(thx for it to elemoine):'''[[BR]]
 [http://openlayers.org/dev/examples/highlight-feature.html]

 - click on the feature on the right to select it
 - in the FireBug console highlight the feature with
 map.controls[4].highlight(map.layers[0].features[0])
 - then unhighlight it with
 map.controls[4].unhighlight(map.layers[0].features[0])
 - bug: the feature turns yellow, while it should be blue

 I attach a patch the only thing about is where to throw the
 featureunhighlighted event. Only when assigned the default style(like in
 the patch) or also when highlight of the previous highlighter is called
 (outside of the if-stmt).

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3296>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list