Browse code

Never zoom in during animation.

From: Marius Gedminas <marius@gedmin.as>

Jose.R.Fonseca authored on 13/07/2008 03:20:57
Showing 1 changed files

  • xdot.py index 7af9367..17a2454 100755
... ...
@@ -679,7 +679,7 @@ class ZoomToAnimation(MoveToAnimation):
679 679
         visible = min(rect.width, rect.height) * .9
680 680
         if distance > visible:
681 681
             desired_middle_zoom = visible / distance
682
-            self.extra_zoom = 4 * (desired_middle_zoom - middle_zoom)
682
+            self.extra_zoom = min(0, 4 * (desired_middle_zoom - middle_zoom))
683 683
 
684 684
     def animate(self, t):
685 685
         a, b, c = self.source_zoom, self.extra_zoom, self.target_zoom