summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/map/_map.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/javascripts/rectangles/map/_map.js')
-rw-r--r--assets/javascripts/rectangles/map/_map.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/assets/javascripts/rectangles/map/_map.js b/assets/javascripts/rectangles/map/_map.js
index 72901a1..e612c98 100644
--- a/assets/javascripts/rectangles/map/_map.js
+++ b/assets/javascripts/rectangles/map/_map.js
@@ -17,6 +17,11 @@ var map = new function(){
}
base.zoom = 1/8
+ base.zoom_exponent = -3
+ base.set_zoom = function (n) {
+ base.zoom_exponent = n
+ base.zoom = pow(2, base.zoom_exponent)
+ }
var canvas = document.createElement("canvas")
var ctx = window.ctx = canvas.getContext("2d")