Skip to content

Having 2 select interactions active at the same time #4822

@probins

Description

@probins

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions