Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Having 2 select interactions active at the same time #4822
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.
referenced this issue
Feb 12, 2016
http://jsfiddle.net/4exzxbr3/ adapted from select-features example.
Hover correctly selects, click select is triggered but