You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use the aspect_ratio keyword of ZoomTool and was expecting:
the blue overlay that show the box zoom to be forced to respect the aspect_ratio
the final zoomed view to correspond to the blue overlay
Unfortunately, while 1) is indeed the case, 2) is not. The zoom is actually done according to the mouse position at the time of unclicking. I think that is a bug since it implies that the aspect_ratio is not respected.
Looking at the file better_selecting_zoom.py, this is due to self._screen_end being set to (event.x, event.y) when entering _end_select on line 330. Because of that the appropriate value of self._screen_end that is set in selecting_mouse_move according to the aspect_ratio keyword is forgotten.
After commenting line 330 of file better_selecting_zoom.py, I obtain the exact behavior I was expecting.
Hello,
I was trying to use the aspect_ratio keyword of ZoomTool and was expecting:
Unfortunately, while 1) is indeed the case, 2) is not. The zoom is actually done according to the mouse position at the time of unclicking. I think that is a bug since it implies that the aspect_ratio is not respected.
Looking at the file better_selecting_zoom.py, this is due to self._screen_end being set to (event.x, event.y) when entering _end_select on line 330. Because of that the appropriate value of self._screen_end that is set in selecting_mouse_move according to the aspect_ratio keyword is forgotten.
After commenting line 330 of file better_selecting_zoom.py, I obtain the exact behavior I was expecting.
A simple example is given here: https://github.com/SDiot/chaco_troubles/blob/master/ZoomTool_AspectRatio.py
I think that this is a bug and should be fixed. If it's not, please let me know why! :)
Thanks!
S.D.
The text was updated successfully, but these errors were encountered: