Fix zoom jump by anchoring magnification to viewport center#84
Fix zoom jump by anchoring magnification to viewport center#84vade merged 1 commit intoFabric-Project:mainfrom
Conversation
2b6a9f4 to
72f0f46
Compare
Addresses feedback from Fabric-Project#83 regarding zoom stutter caused by @Environment observation cascades. Marks Graph drag preview properties as @ObservationIgnored to prevent view recalculation during gestures. Calculates zoom anchor from current scroll position instead of gesture location to eliminate jumps between magnification gestures. Related: Fabric-Project#83, Fabric-Project#66
72f0f46 to
479c769
Compare
|
Thanks! Post merge of the last PR I caught the old deprecated magnify gesture - I was working on similar changes but you beat me to it :) At a glance this looks good. Will review later tonight! Again thank you! |
|
So this method seems to cause Also this PR introduces visual glitches when scrolling with certain zoom levels, likely due to incoherent values due to state updates during view callbacks. ill poke around, because overall the zoom anchor behaviour def feels right, but the overall resulting behaviour could use some work. Thank you again for the PRs! |
|
Did a smidge of cleanup on my own branch of this - Thanks again, these PRs are awesome! Keep em coming! |
Addresses feedback from #83 regarding zoom stutter caused by @Environment observation cascades.
Changes:
Result: Smooth zoom to viewport center wherever scrolled, no jump on gesture initiation/termination.
Screen.Recording.2025-11-15.at.10.14.32.PM.mov
Related: #83, #66