From 67f565e81ba6123b4345dbb5a3a8bdb12afa3c38 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 13 Sep 2021 11:26:22 +0200 Subject: [PATCH] merge zoom changes --- camera.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/camera.py b/camera.py index c898bb6..79c1c73 100644 --- a/camera.py +++ b/camera.py @@ -335,9 +335,12 @@ class Camera: tilt = max(tilt, delta['elevation']) changed = True ''' - if zoom and (not delta['absoluteZoom'] or (delta['absoluteZoom'] >= 0) != direction['absoluteZoom']): - zoom = 0 - changed = True + if delta and 'absoluteZoom' in delta and 'absoluteZoom' in direction: + if zoom and (not delta['absoluteZoom'] or (delta['absoluteZoom'] >= 0) != direction['absoluteZoom']): + zoom = 0 + changed = True + elif delta: + print('no absoluteZoom in delta?', delta, direction) if changed or not n % 500: print('update move', move, current)