From 9a87e3a1a61b222097c7991edec5c2c94a6c4cae Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Thu, 17 Apr 2014 02:53:00 -0400 Subject: cursor centered on camera --- assets/javascripts/rectangles/map/ui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'assets/javascripts/rectangles/map/ui.js') diff --git a/assets/javascripts/rectangles/map/ui.js b/assets/javascripts/rectangles/map/ui.js index 8c2b668..0c90388 100644 --- a/assets/javascripts/rectangles/map/ui.js +++ b/assets/javascripts/rectangles/map/ui.js @@ -52,7 +52,7 @@ map.ui = new function(){ function down (e, cursor){ cursor.x.add( map.center.a + map.bounds.a/2 ) - cursor.y.add( map.center.b - map.bounds.b/2 ) + cursor.y.add( -map.center.b - map.bounds.b/2 ) var intersects = clipper.rooms.filter(function(r){ return r.focused = r.rect.contains(cursor.x.a, cursor.y.a) @@ -72,13 +72,13 @@ map.ui = new function(){ function move (e, cursor) { cursor.x.add( map.center.a + map.bounds.a/2 ) - cursor.y.add( map.center.b - map.bounds.b/2 ) + cursor.y.add( -map.center.b - map.bounds.b/2 ) z=true } function drag (e, cursor) { cursor.x.b += map.center.a + map.bounds.a/2 - cursor.y.b += map.center.b - map.bounds.b/2 + cursor.y.b += -map.center.b - map.bounds.b/2 if (base.dragging) { base.dragging.rect.translation.a = cursor.x.magnitude() -- cgit v1.2.3-70-g09d2