Re: [OpenLayers-Users] OpenLayers.Control.SelectFeature with highlight, toggle

2010-08-27 Thread Eric Lemoine
On Fri, Aug 27, 2010 at 3:37 PM, Christian Niemitz-Rossant
 wrote:
> Hi Eric,
> after filing the ticket
>
> http://trac.openlayers.org/ticket/2812
>
> I got a message from Ilias, because he had to deal with the same problem.
> His solution to add to the selectCtrl an onUnselect and in this function to
> call
>
> highlightCtrl.unhighlight(feature);
>
> works fine for me. The two controls interfere and by calling a function of
> one in the other solves the problem. Anyway I think that a solution of only
> one control for highlight and select might be valuable, or?
>
> Otherwise an example for this problem should be under examples and I would
> be happy to provide it.

Hi. I just attached a patch to the ticket. Could you tell if it works
for you, and comment back in the comment please? Thanks.


-- 
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.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] OpenLayers.Control.SelectFeature with highlight, toggle

2010-08-27 Thread Christian Niemitz-Rossant
Hi Eric,
after filing the ticket

http://trac.openlayers.org/ticket/2812

I got a message from Ilias, because he had to deal with the same
problem. His solution to add to the selectCtrl an onUnselect and in this
function to call

highlightCtrl.unhighlight(feature);

works fine for me. The two controls interfere and by calling a function
of one in the other solves the problem. Anyway I think that a solution
of only one control for highlight and select might be valuable, or?

Otherwise an example for this problem should be under examples and I
would be happy to provide it.

Kind regards,
Christian


Eric Lemoine wrote:
> On Thu, Aug 26, 2010 at 9:13 AM, Christian Niemitz-Rossant
>  wrote:
>   
>> I have some troubles using feature selection with highlight and toggle:
>>
>> In the OpenLayers example highlight-feature.html I replaced the line 55
>> which is
>>
>> {clickout: true}
>>
>> by
>>
>> {toggle: true}
>>
>> Then I applied these steps
>>
>> 1. move cursor on the left triangle => triangle is highlighted
>> 2. click on the left triangle => triangle is selected
>> 3. move cursor out of the triangle => triangle is still selected
>> 4. move cursor on the left triangle => triangle is highlighted
>> 5. click on the triangle => triangle is normal
>> 
>
> I don't observe that. It gets selected in my case, which is expected I guess.
>
>   
>> 6. move cursor out of the triangle => triangle is still normal
>> 
>
> It remains selected for me.
>
>   
>> 7. move cursor on the triangle (no click!) => triangle is highlighted
>> 8. move cursor out of the triangle => triangle is shown as selected (without
>> click!?)
>>
>> So somehow the select and the highlight get confused about the correct
>> style. The feature is not selected, but it is displayed as selected.
>> 
>
> Indeed. If I click the feature again to toggle it I also observe
> incorrect behavior when moving out and in.
>
>
>   
>> It looks like a bug to me, but maybe there is another proposed way to use
>> highlight AND toggle at the same time (and hopefully including multiple).
>> 
>
> So yes there's a bug. Can you please create a ticket for it please?
>
> Thanks for reporting the problem.
>
>
>   
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] OpenLayers.Control.SelectFeature with highlight, toggle

2010-08-26 Thread Eric Lemoine
On Thu, Aug 26, 2010 at 9:13 AM, Christian Niemitz-Rossant
 wrote:
> I have some troubles using feature selection with highlight and toggle:
>
> In the OpenLayers example highlight-feature.html I replaced the line 55
> which is
>
> {clickout: true}
>
> by
>
> {toggle: true}
>
> Then I applied these steps
>
> 1. move cursor on the left triangle => triangle is highlighted
> 2. click on the left triangle => triangle is selected
> 3. move cursor out of the triangle => triangle is still selected
> 4. move cursor on the left triangle => triangle is highlighted
> 5. click on the triangle => triangle is normal

I don't observe that. It gets selected in my case, which is expected I guess.

> 6. move cursor out of the triangle => triangle is still normal

It remains selected for me.

> 7. move cursor on the triangle (no click!) => triangle is highlighted
> 8. move cursor out of the triangle => triangle is shown as selected (without
> click!?)
>
> So somehow the select and the highlight get confused about the correct
> style. The feature is not selected, but it is displayed as selected.

Indeed. If I click the feature again to toggle it I also observe
incorrect behavior when moving out and in.


>
> It looks like a bug to me, but maybe there is another proposed way to use
> highlight AND toggle at the same time (and hopefully including multiple).

So yes there's a bug. Can you please create a ticket for it please?

Thanks for reporting the problem.


-- 
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.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users