summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/map
diff options
context:
space:
mode:
Diffstat (limited to 'assets/javascripts/rectangles/map')
-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
}