-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Detect mouse events in a Plot
#759
Comments
Related to #734 but more about events |
Mouse position and delta are now available in #766, feel free to give it a try. |
@EmbersArc The mouse position functions work great! Related to this interactive/event handling plots I would like to enable/disable plot dragging to change the bounds based on where in the plot the pointer was pressed (example use case: if certain parts of the plot are editable and a control point is pressed I want to disable dragging to change bounds and instead use the drag to change the plot data). The problem is the Plot is consumed in the call to show so I am not sure how to disable dragging based on the pressed plot location. I thought maybe I could just implement dragging plot bounds separately but I couldn't find a way to edit the plot bounds programmatically. |
I think this is closed by the PR:s above |
I want to make an interactive plot, so this involves being able to click and drag the various plot elements. Currently you can use the general
Response::clicked_by
etc for detecting clicks/drags anywhere on the whole plot but it has a few drawbacks:I think it would be nice if adding elements to the plot also gave something like a
Response
object that allows us to check interactions.Making things automatically be draggable (especially Points, Polygons) would be nice as well.
As a long term goal, perhaps we could have projection/closest point methods as well. But first the ability to detect click/drag on Plot elements would be good
I am just starting to learn how to use egui, so apologies if I have missed an existing feature.
The text was updated successfully, but these errors were encountered: