#78 ZoomWheelScale algorithm patch

open
nobody
None
5
2012-09-19
2009-12-03
Ella Astashonok
No

ZoomWheelScale on mode ZoomOnMouseCenter work not so good. It shift point of graph under curor to the center of pane but the cursor is still placed on old place. And on next mouse wheel zoom event the part of graph witch zoomed is not thouse where the first zoom event was raised. So graph shifted out of view.
I change the algorithm of zooming so that graph zoomes around the cursor and not shifted on center of pane. I think this is more smart behavior of zooming then current.
I'm not sure how it will work with logarithm scales (current algorithm AFAIK is not good at this to). So it work good only on linear scales.

Best regards! Thanks for great component. ;o)

Discussion

  • P.S. Sorry for my bad englidh - it's not my native language. ;o)