-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Viewport zoom and offset resetting when image out of bounds has been re-implemented but there is currently a bug where when zoom factor is animated a second time #86 the animation is skipped and it jumps to zoom factor 1.0 instead of animating to it.
Screencast_20251126_203118.mp4
As you can see the panning animation works fine but the zoom animation is broken.
Clearing the animation after we are done fixes this issue but we cannot do that as there is no ui.ctx().clear_animation("some_animation_id") method in egui, we only have ui.ctx().clear_animations() and that clears all animations which bricks any other animation that is currently in progress. If egui adds ui.ctx().clear_animation("some_animation_id") we can also remove many lines away from my logic like first_pass and randomized animation ids put in place to combat the issues I encountered not being able to reset / clear the animation.