JannisX11 / blockbench

Blockbench - A low poly 3D model editor
https://www.blockbench.net
GNU General Public License v3.0
3.39k stars 292 forks source link

In the timeline tab, keep cursor at the same timestamp when zooming in and out #2111

Open Cub0use opened 11 months ago

Cub0use commented 11 months ago

Detailed description of your suggestion

With a mouse and keyboard. I spend a lot of time zooming in and out of the timeline, to click keyframes to edit them and move them. But I always need to scroll or drag the view to find the ones I was aiming for, and place them comfortably in the middle of the timeline.

When zooming in or out, at a certain zooming threshold, the timeline view shifts, changing the timestamp the cursor was hovering (the margin space at the end of the timeline becomes kind of fixed in screen space, and the view does not shift automatically to account for it).

So I wish the view shifted automatically to keep the cursor over the same timestamp (within the lower and upper limits of the animation's boundaries of course).

https://github.com/JannisX11/blockbench/assets/81629481/827c020d-6eff-4f31-a14f-498c90b7ec02

JannisX11 commented 1 week ago

I wasn't able to reproduce this anymore in 4.11.1.

Cubouse commented 1 week ago

I can still reproduce it.

As far as determining what causes it visually, I newly found that it happens when the thumb of the scroll bar reaches the right boundary, or when it's near it. The current zoom level did not matter.

Upon zooming:

  1. The timeline view shifts (that's the issue I'm reporting)
  2. And I noticed that the thumb will either:
    • stay stuck to the right and not scale down
    • or scale down, and shift a bit to the left of the scroll bar.

https://github.com/user-attachments/assets/366c44e6-2461-4351-91ec-198b511c3b7b