[OpenLayers-Trac] Re: [OpenLayers] #2926: Select control do not
unselect last feature
if is NOT in the first layer (was: Select control do not unselect
last feature if is in the first layer)
OpenLayers
trac-20090302 at openlayers.org
Fri Nov 12 08:59:48 EST 2010
#2926: Select control do not unselect last feature if is NOT in the first layer
-----------------------------------+----------------------------------------
Reporter: PadovaBoy | Owner: tschaub
Type: bug | Status: new
Priority: major | Milestone: 2.11 Release
Component: Control.SelectFeature | Version: 2.10
Keywords: | State:
-----------------------------------+----------------------------------------
Comment(by PadovaBoy):
Replying to [comment:1 pgiraud]:
> Can you please provide a complete test case, or a bit of code so that
we're able to reproduce the bug ?
> Thanks.
Sure, for now: thank u for the attention.
PS: you can see immediately the problem in this line (from the original
code):
for (var l = 0; l < layers.length; ++l) {
if (layer.selectedFeatures.length === 0) { return; }
in the loop, on the first execution, it check the length of the selected
features...if is 0 exit..so if the previously selected feature reside in
the second layer will never unselect..
--
Ticket URL: <http://trac.openlayers.org/ticket/2926#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list