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

Add support for the default selection to the slider #576

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

laeubi
Copy link
Member

@laeubi laeubi commented Mar 16, 2024

Currently the slider fires an update event on each change, but this can be not desired e.g because changing the value might be an expensive operation, or even the user chooses the same value in the end.

This now captures the current value on mouse down and if it has changed on mouseup fires a default selection event. This way a user of the slider can always decide what approach works best or even combine the different approaches. For example one can use the fast changing value to update ui-elements and the default selection to persist the value to disk/database/preferences/...

Currently the slider fires an update event on each change, but this can
be not desired e.g because changing the value might be an expensive
operation, or even the user chooses the same value in the end.

This now captures the current value on mouse down and if it has changed
on mouseup fires a default selection event. This way a user of the
slider can always decide what approach works best or even combine the
different approaches. For example one can use the fast changing value to
update ui-elements and the default selection to persist the value to
disk/database/preferences/...
@laeubi laeubi requested a review from lcaron March 16, 2024 15:35
@laeubi
Copy link
Member Author

laeubi commented Mar 18, 2024

@lcaron what do you think?

@lcaron lcaron merged commit 476fe0f into eclipse:master Mar 18, 2024
3 checks passed
@lcaron
Copy link
Contributor

lcaron commented Mar 18, 2024

Fine for me, thank you very much @laeubi

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.

2 participants