From 3575f0ade6cd125e08aa40e0ff9187820bb3b1d0 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Apr 2014 13:32:41 -0400 Subject: floor/ceiling region culling --- assets/javascripts/rectangles/map/ui.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'assets/javascripts/rectangles/map') diff --git a/assets/javascripts/rectangles/map/ui.js b/assets/javascripts/rectangles/map/ui.js index 9faebea..f612fe2 100644 --- a/assets/javascripts/rectangles/map/ui.js +++ b/assets/javascripts/rectangles/map/ui.js @@ -58,7 +58,10 @@ map.ui = new function(){ } } - function up (e, cursor) { + function up (e, cursor, new_cursor) { + + new_cursor.x.div(map.zoom).add( map.center.a + map.bounds.a/2 ) + new_cursor.y.div(map.zoom).add( -map.center.b - map.bounds.b/2 ) if (base.creating) { if (cursor.height() != 0 && cursor.width() != 0) { -- cgit v1.2.3-70-g09d2