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

Allow multiple point selection with shift key #1175

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Conversation

JustinElms
Copy link
Contributor

Background

The OpenLayers select feature inherently allows users to select multiple features by holding the shift key when clicking on them. The Map component however fires the signal to open the plot window immediately after a selection is made preventing users from easily selecting multiple points to plot. A shift key check is added to the select function to signal that the user is selecting multiple points prevents the window from opening via a multiSelect state variable. Likewise, an event listener is added to the main ocean navigator component to check that the shift key is released which modifies the multiSelect state and allows the plot window to open.

Why did you take this approach?

These checks allow the navigator to track when the user is selecting multiple points and delay the opening of the plot window.

Anything in particular that should be highlighted?

Multiple point selection is only enables when the user is selecting points to plot.

Checks

  • I ran unit tests.
  • I've tested the relevant changes from a user POV.
  • I've formatted my Python code using black ..

@JustinElms JustinElms self-assigned this Jan 9, 2025
@JustinElms JustinElms merged commit 1c21fe3 into master Jan 9, 2025
5 checks passed
@JustinElms JustinElms deleted the shift-select-points branch January 9, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant