-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Always report skipped feature hits for the original layer #4854
Conversation
fa930d8
to
9f0fefd
Compare
Nice branch name 😉 |
Agreed. Other things I like:
Things that make me scared:
In summary:
|
@tschaub I wrote a blog post about the whole story: http://ahocevar.net/openlayers/2016/02/17/trilogy-of-error.html. I hope it explains the whole evolution of these problems. |
There is no real need to make this change, so I changed it back to the way it was. The key change of this pull request is that skipped features are now hit-detected the same way as if they had never been changed on their original layer. This means that they will be hit-detected on their original layer only, even when duplicated on one or more unmanaged layers. |
When a feature is selected, the Select interaction calls For user created unmanaged layers, nothing changes, because a user cannot call |
b2461c2
to
97c5d67
Compare
97c5d67
to
5bc00d8
Compare
@ahocevar So if you knew that all one year before (see publishing date), why didn't you fix it earlier? ;-) |
Thanks @ischas - I shouldn't be writing blog posts at 2am. Updated blog post URL: http://ahocevar.net/openlayers/2016/02/17/trilogy-of-error.html. |
@ahocevar 404! First link was good, but the publishing date was wrong! Maybe you must fix the blog post, too. |
@ischas Took a few seconds to update on the server. Now it's live. |
No doubt. All of us are benefited at his cost. |
Anyone brave enough to review this? @fredj or @tsauerwein maybe? |
LGTM, thanks Andreas |
…-relies-on-unmanaged-layers-and-skipped-features-this-time-for-real---hopefully Always report skipped feature hits for the original layer
In the process of getting to the bottom of #4822, it occurred to me why so many iterations of patching the select interaction fixed one issue, only to create another: hit detection of features should return the same features and layers, no matter be features selected or not.
I think this fix makes the affected code easier to read and understand, and turns the select interaction into one that could almost be loved.
Fixes #4822.