[OpenLayers-Users] Event "featureunhighlighted" not triggered
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Mar 17 15:51:43 EDT 2010
On Wed, Mar 17, 2010 at 5:14 PM, Olivier THIERRY
<olivier.thierry at gmail.com> wrote:
> Hi,
>
> I have a vector layer with two SelectFeature controls : one is used
> for selection, the other is used to show a popup.
> It works well except for one case : if I select an element in the
> vector, then I move the mouse to this element, the
> "featurehighlighted" event is fired, but on mouse out the
> "featureunhighlighted" event is not fired !
This is expected, although it's not clear to me whether this the
wished behavior.
1. mouse click on the feature -> control 1 selects the feature
2. mouse over the feature -> control 2 highlights the feature ->
"featurehighlighted" triggers
3. mouse out of feature -> control 2 detects that another control
(control 1) had highlighted the feature before it highlighted it
itself, so it uses that control to highlight the feature the way it
was highlighted before it highlighted it itself ->
"featureunhighlighted" does not trigger
Do you (or others) think we should trigger "featureunhighlighted"
after the call to theOtherControl.highlight()?
See attached patch (untested).
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select-feature.patch
Type: text/x-patch
Size: 1447 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100317/96ab9d13/select-feature.bin
More information about the Users
mailing list