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

fix: Events not being triggered on last element deselection #239

Merged

Conversation

carlos-algms
Copy link
Contributor

Fixes #238

This PR removes an if statement that blocked move and stop events from being triggered because there were no more selected elements.

Steps to reproduce:

  1. select elements by clicking or dragging a selection
  2. unselect and leave only 1 element
  3. click on that last element

Check the stop event containing no stored elements isn't triggered.

@simonwep simonwep force-pushed the fix-events-not-triggered-on-deselect branch from 8c562b2 to f7b66a6 Compare December 31, 2024 15:26
@simonwep
Copy link
Owner

I took another look at it and I think you're right, I believe that was just a short-thought optimization skipping the rest if the query yields no elements, decided to integrate that now!

@simonwep simonwep merged commit 79256a4 into simonwep:master Dec 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unselecting the last element doesn't trigger move and stop
2 participants