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

Trigger when nothing has been (de)selected #6541

Closed
wants to merge 2 commits into from

Conversation

ca0v
Copy link

@ca0v ca0v commented Feb 27, 2017

In the past ol.interaction.Select used to fire a 'select' event even when there were no features selected/deselected. A condition was added to prevent this event from firing when there was nothing selected/deselected. I'm proposing a new event, "empty", which fires when nothing was selected/deselected. Without this I believe an explicit map.on("click") handler is required and managing the interaction with the map click and the select interaction gets messy.

In the past ol.interaction.Select used to fire a 'select' event even when there were no features selected/deselected.  A condition was added to prevent this event from firing when there was nothing selected/deselected.  I'm proposing a new event, "empty", which fires when nothing was selected/deselected.  Without this I believe an explicit map.on("click") handler is required and managing the interaction with the map click and the select interaction gets messy.
empty -> EMPTY
Copy link
Author

@ca0v ca0v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

travis build failed due to typo

@bjornharrtell
Copy link
Contributor

I can see the use case, but I think I'd prefer just triggering the existing select event with empty arrays for selected and deselected properties. I also think this should be opt in via a new boolean option for the Select interaction, as I think the current behavior should be regarded stable.

ca0v added a commit to ca0v/ol3 that referenced this pull request Mar 1, 2017
@ca0v
Copy link
Author

ca0v commented Mar 1, 2017

@bjornharrtell I'm failing to commit with test and can't figure out how to build test_requires.js (I'm on windows, no make).

@bjornharrtell
Copy link
Contributor

Sorry, can't put time into this if you want it done in the short term (days). I suggest getting a prompt with make, or even better use a *nix. :)

@stale
Copy link

stale bot commented May 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 22, 2019
@stale stale bot closed this May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants