Ticket #3296 (new bug)
Restore old highlight style on unhighlight
| Reported by: | mosesonline | Owned by: | tschaub |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.13 Release |
| Component: | Control.SelectFeature | Version: | SVN |
| Keywords: | Cc: | elemoine | |
| State: | Review |
Description
In case of multiple SelectFeature controls the unhighlight function doesn't reset the last style, but the default style unlike the outFeature function.
Reproduce(thx for it to elemoine):
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).

