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

Pass null as forEachFeatureAtPixel layer arg for unmanaged layers #4391

Merged

Conversation

ahocevar
Copy link
Member

@ahocevar ahocevar commented Nov 6, 2015

Features on the removed ol.FeatureOverlay were detected by ol.Map#forEachFeatureAtPixel, and the layer arg passed to the handler function was null. This change makes it so the same behaviour applies to features on an unmanaged vector layer. Previously the forEachFeatureAtPixel handler was called with a reference to the unmanaged layer as layer arg.

See #4143 (comment).

Fixes #4114.

@ahocevar
Copy link
Member Author

ahocevar commented Nov 6, 2015

@bartvde, you may want to have a look to see how this affects #4114.

@bartvde
Copy link
Member

bartvde commented Nov 7, 2015

#4114 is this still the same @ahocevar with this change
Assuming you mean if I still see the issue in your branch?

@ahocevar
Copy link
Member Author

ahocevar commented Nov 7, 2015

@bartvde I meant you should look at my branch to see if it makes your life easier, so you don't need a code snippet like the one you posted in your application.

Your issue is unlikely to be fixed with this branch, but it might. Because now forEachFeatureAtPixel is only called once for features that are on multiple unmanaged layers.

@ahocevar
Copy link
Member Author

ahocevar commented Nov 8, 2015

@bartvde I added a commit that fixes #4114. Please review.

@bartvde
Copy link
Member

bartvde commented Nov 8, 2015

thanks @ahocevar I can confirm that this now fixes my issue from #4114
I'll do a review of the code tomorrow morning if no one gets to it before then.

@ahocevar ahocevar force-pushed the unmanaged-layer-foreachfeatureatpixel branch from 4680c8b to b6db331 Compare November 8, 2015 09:56
@bartvde
Copy link
Member

bartvde commented Nov 9, 2015

LGTM @ahocevar does this deserve a mention in the release notes?

@ahocevar
Copy link
Member Author

ahocevar commented Nov 9, 2015

I can add that, yes.

@ahocevar ahocevar force-pushed the unmanaged-layer-foreachfeatureatpixel branch from f497b37 to a446147 Compare November 9, 2015 08:45
@ahocevar
Copy link
Member Author

ahocevar commented Nov 9, 2015

Done @bartvde.

@bartvde
Copy link
Member

bartvde commented Nov 9, 2015

LGTM @ahocevar please merge if Travis agrees again

ahocevar added a commit that referenced this pull request Nov 9, 2015
…atpixel

Pass null as forEachFeatureAtPixel layer arg for unmanaged layers
@ahocevar ahocevar merged commit bfbb802 into openlayers:master Nov 9, 2015
@ahocevar ahocevar deleted the unmanaged-layer-foreachfeatureatpixel branch November 9, 2015 09:19
ahocevar added a commit to ahocevar/openlayers that referenced this pull request Nov 18, 2015
ahocevar added a commit that referenced this pull request Nov 19, 2015
Fix select interaction regression caused by #4391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants