Minor fix for zooming

It's weird that when you Scroll Up, the interactive shell zooms out.

So to fix this replace factor -> 1/factor .
This commit is contained in:
Paras Sharma 2021-07-14 13:56:20 +05:30 committed by GitHub
parent 17d7f0b6f0
commit 4940ccac7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,7 +570,7 @@ class Scene(object):
frame = self.camera.frame
if self.window.is_key_pressed(ord("z")):
factor = 1 + np.arctan(10 * offset[1])
frame.scale(factor, about_point=point)
frame.scale(1/factor, about_point=point)
else:
transform = frame.get_inverse_camera_rotation_matrix()
shift = np.dot(np.transpose(transform), offset)