Ticket #3296 (new bug)

Opened 2 years ago

Last modified 16 months ago

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).

Attachments

selectFeature.patch Download (1.2 KB) - added by mosesonline 2 years ago.
openlayers-3296.patch Download (3.6 KB) - added by mosesonline 16 months ago.

Change History

Changed 2 years ago by mosesonline

Changed 2 years ago by mosesonline

  • summary changed from Restore old highlight on unhighlight to Restore old highlight style on unhighlight

Changed 16 months ago by mosesonline

I've created a new patch with tests. Test test_Control_SelectFeature_unhightlight fails with current master branch but with the patch it's fine.

Changed 16 months ago by mosesonline

Note: See TracTickets for help on using tickets.