Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix select interaction regression caused by #4391 #4450

Merged
merged 1 commit into from Nov 19, 2015

Conversation

@ahocevar
Copy link
Member

@ahocevar ahocevar commented Nov 18, 2015

The select interaction determines selection candidate features by using ol.Map#forEachFeatureAtPixel. It uses an internal unmanaged layer that selected features are added to, and adds selected features to the skippedFeatures hash on the map. Before the change made with this pull request, a selected feature was immediately removed from the selection as soon as it was added to the unmanaged layer, because the unmanaged layer was ignored in forEachFeatureAtPixel (null as layer arg and if (layer && filter())). Now already selected features remain in the selection, because a null layer is accpted in the forEachFeatureAtPixel handler (if (!layer || filter())).

Fixes #4441.

@tschaub
Copy link
Member

@tschaub tschaub commented Nov 18, 2015

@ahocevar can you provide a bit of a description and summary of the situation. The diff alone is a bit mysterious, and the link to #4391 leads to another ticket without a description. It would be great to get a bit of a knowledge dump on some of these tickets.

Thanks for the work getting to the bottom of this.

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 19, 2015

@tschaub I updated the descriptions of both tickets. I hope it is clearer now - I'm a bit slow typing today, so I didn't get too verbose.

@tschaub
Copy link
Member

@tschaub tschaub commented Nov 19, 2015

Thanks for the explanation @ahocevar. This is very helpful.

Please merge.

ahocevar added a commit that referenced this pull request Nov 19, 2015
Fix select interaction regression caused by #4391
@ahocevar ahocevar merged commit aa260f8 into openlayers:master Nov 19, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.004%) to 75.395%
Details
@ahocevar ahocevar deleted the ahocevar:fix-select branch Nov 19, 2015
@tohu12
Copy link

@tohu12 tohu12 commented Nov 22, 2015

@ahocevar, I use two "ol.interaction.Select" for two vector layers with different style for hover.
When you move with pointer to one Feature, show two different symbol from both interaction, because every interaction work with both unmanaged layer.

Example http://jsfiddle.net/tohu/Lh76thmz/2/

What is right solution ? With v3.11.1 http://jsfiddle.net/tohu/Lh76thmz/1/ is alright, but now no.
Thanks

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 22, 2015

The behavior you are seeing now is the same as in 3.10.1, but I think it should be considered a (separate) bug.

@ahocevar
Copy link
Member Author

@ahocevar ahocevar commented Nov 22, 2015

@tohu12 I created #4471 to track this separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants