diff options
Diffstat (limited to 'src/zoom.py')
-rw-r--r-- | src/zoom.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/zoom.py b/src/zoom.py index d3092e0..78b133b 100644 --- a/src/zoom.py +++ b/src/zoom.py @@ -1,5 +1,3 @@ -offset_limit = 600 - def zoom_in(zoom): if zoom[0] > 128: zoom = (zoom[0] / 1.5, zoom[1] / 1.5) @@ -16,21 +14,17 @@ def zoom_reset(): return zoom, offset def offset_down(offset): - if offset[1] - 20 > -offset_limit: - offset = (offset[0], offset[1] - 20) + offset = (offset[0], offset[1] - 20) return offset def offset_up(offset): - if offset[1] + 20 < offset_limit: - offset = (offset[0], offset[1] + 20) + offset = (offset[0], offset[1] + 20) return offset def offset_right(offset): - if offset[0] - 20 > -(offset_limit * 16/9): - offset = (offset[0] - 20, offset[1]) + offset = (offset[0] - 20, offset[1]) return offset def offset_left(offset): - if offset[0] + 20 < offset_limit * 16/9: - offset = (offset[0] + 20, offset[1]) + offset = (offset[0] + 20, offset[1]) return offset
\ No newline at end of file |