summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/map/ui.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-04-17 19:22:08 -0400
committerJules Laplace <jules@okfoc.us>2014-04-17 19:22:08 -0400
commitb67e1e3c83e06fe7b5dfa4fa75f714121c02ce50 (patch)
tree73f4a250bf20794706f8118b231be0574e4751a7 /assets/javascripts/rectangles/map/ui.js
parent0010a692359ec6ba90aaf2e20d77bfa4016325d5 (diff)
may need to cull more aggressively
Diffstat (limited to 'assets/javascripts/rectangles/map/ui.js')
-rw-r--r--assets/javascripts/rectangles/map/ui.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/assets/javascripts/rectangles/map/ui.js b/assets/javascripts/rectangles/map/ui.js
index ef96217..6560695 100644
--- a/assets/javascripts/rectangles/map/ui.js
+++ b/assets/javascripts/rectangles/map/ui.js
@@ -26,11 +26,12 @@ map.ui = new function(){
cursor.x.div(map.zoom).add( map.center.a + map.bounds.a/2 )
cursor.y.div(map.zoom).add( -map.center.b - map.bounds.b/2 )
- if (e.ctrlKey) {
+ if (e.ctrlKey || e.which === 3) {
map.center.a = cursor.x.b = cursor.x.a + map.bounds.a/2
- map.center.b = cursor.y.b = cursor.y.a
+ map.center.b = cursor.y.b = cursor.y.a + map.bounds.b
base.mouse.down = false
e.preventDefault()
+ e.stopPropagation()
return
}