-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
feat: timeslider scroll event updates bar position #3336
base: master
Are you sure you want to change the base?
feat: timeslider scroll event updates bar position #3336
Conversation
@KartikWatts I've just tested this PR. It's working perfectly. 🚀 |
Time zooming is also important. Wouldn't be good to keep this previous feature with Ctrl + scrolling? |
@rodolforg |
So the timeslider could have it too, right?
|
It can have but I'm wondering is it really needed to have it on the timeline strip. 👀 |
@KartikWatts could you please re-add the old feature but now when user presses |
Sure, I'll update the PR soon. Regards. |
scroll event updates to override current zooming behaviour with moving the timeline-bar position modifies timeline-bar position, and scroll through the panel based on center
b41306f
to
86a7979
Compare
@rodolforg @yoSachinkr Sorry for the delay. Updated the PR, keeping the zoom functionality now with |
Time scroll_time = time_model->get_time(); //scroll is based on track time | ||
Time zoom_time = time_plot_data->get_t_from_pixel_coord(event->x); //zoom is based on time represented by pixel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note here, after some thought I kept the separate time representation for scroll and zoom functionalities.
As zooming would ideally remain unchanged when based on time_plot_data->get_t_from_pixel_coord
but for scrolling I felt it better suited with time_model->get_time()
as calculation based on actual timeline-bar position on panel, kindly let me know your thoughts.
closes #2931
Description:
This pull request enhances the functionality of
Widget_Timeslider
by implementing scroll event updates. It achieves this by introducing repositioning of the timeline bar within theon_scroll_event
method and updating the existing zoom functionality. Additionally, it enables smooth scrolling through the panel, adjusting based on the central position of theTimeModel
. These updates significantly improve the user experience and enhance the overall usability of theWidget_Timeslider
.Changes:
Widget_Timeslider
.ctrl
+scroll
.on_scroll_event
method.TimeModel
.