summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles/map/ui.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-04-17 13:32:41 -0400
committerJules Laplace <jules@okfoc.us>2014-04-17 13:32:41 -0400
commit3575f0ade6cd125e08aa40e0ff9187820bb3b1d0 (patch)
treefeeff0399047b1b3033e0c508bde359527ab75c8 /assets/javascripts/rectangles/map/ui.js
parentf6424c4756de2045648de0980de14a32b0126df7 (diff)
floor/ceiling region culling
Diffstat (limited to 'assets/javascripts/rectangles/map/ui.js')
-rw-r--r--assets/javascripts/rectangles/map/ui.js5
1 files changed, 4 insertions, 1 deletions
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) {