24afbfc85424576c3d673ad80f30693aa421dbd3

Author
Pavle Portic <pavle.portic@tilda.center>
Committer
Pavle Portic <pavle.portic@tilda.center>
Date

Message

Add keymap to reset zoom

Diff

 1diff --git a/README.md b/README.md
 2index 3997a50a0382f3dc49ae92e10f2597fa8a5fdb28..0f7236adab1f25e78aca4c99eac88542ca51b093 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -2,6 +2,7 @@
 6 A simple python script that draws an interactive mandelbrot set in the terminal
 7 
 8 ## Keybindings
 9-- Arrows - Move around
10-- `(`/`)` - Zooming
11-- `+`/`-` - Change the number of iterations to run
12+- Arrow keys - Move around
13+- `(`/`)` - Zoom in and out
14+- `=` - Reset zoom
15+- `+`/`-` - Change the number of iterations to run per pixel
16diff --git a/mandelbrot.py b/mandelbrot.py
17index a066038fa95787cf3098173d988f831551bcae57..97a9b85a6541aa9cb5f6d5393bcc249178b042a0 100644
18--- a/mandelbrot.py
19+++ b/mandelbrot.py
20@@ -91,6 +91,9 @@ def handle_keyboard(char):
21 	elif char == 41:  # Zoom in
22 		ZOOM_LEVEL += 1
23 		return False
24+	elif char == 61:  # Zoom reset
25+		ZOOM_LEVEL = 0
26+		return False
27 	elif char == 43:  # Iterations up
28 		MAX_ITERS += 1
29 		return False