-
-
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
Having 2 select interactions active at the same time #4822
Comments
My previous code does not work with master (at least, when I tried a couple of days ago), so, no, #4736 doesn't fix the issue. |
Can you provide a JSFiddle with your test setup? |
http://jsfiddle.net/4exzxbr3/ adapted from select-features example. Hover correctly selects, click select is triggered but |
I'm off on my travels again on Friday, and have a lot to do before then. I'll try and find time to test this with my code. However, if my fiddle above works with the new patch, then it's likely my code will too, so I'd be fine with merging your change. |
@ahocevar just tested this on my code. Can confirm that my code both with and without layers option seems to work now. Thanks a lot. :-) |
I reported in #3878 (comment) that the problem I had when 2 select interactions are active at the same time was reoccurring. I've been investigating this further, and it looks like the problem only occurs when there is a 'layers' option. I tried reproducing the problem on the select-features example, and failed, but then noticed that there is no 'layers' option there. I am using the layers option in my code simply to restrict the layers to the vector layers, which should make it marginally faster, but is not essential. If I remove this option, the code works again.
So, strictly speaking, this is a regression: code which was working before 3.12 no longer works, but it's not necessarily an important one. However, if there is a limitation on when the 'layers' option can be used, then this should be documented. There was a release note on forEachFeatureAtPixel, but it's not at all obvious that this also applies to the 'layers' option on the select interaction.
Also, I notice that the docs for the layers option currently say this is 'Required'; this is surely not correct.
The text was updated successfully, but these errors were encountered: