diff options
| author | Julie Lala <jules@okfoc.us> | 2014-04-22 00:32:10 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-04-22 00:32:10 -0400 |
| commit | c618f157845c6baa492c935dc84012d392993f8f (patch) | |
| tree | 3e01acf1f541ea0bd8f9306eea4c4170d53a1756 /assets/javascripts/rectangles/map/ui.js | |
| parent | 5ac8395a55e8c05e6a73ae26fb7f4d2a4608558d (diff) | |
| parent | 5e795dbab647d9d8c4285233e1efc6262d49f720 (diff) | |
Merge branch 'master' of github.com:okfocus/vvalls
Diffstat (limited to 'assets/javascripts/rectangles/map/ui.js')
| -rw-r--r-- | assets/javascripts/rectangles/map/ui.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/assets/javascripts/rectangles/map/ui.js b/assets/javascripts/rectangles/map/ui.js index f08cae0..f4fc0ef 100644 --- a/assets/javascripts/rectangles/map/ui.js +++ b/assets/javascripts/rectangles/map/ui.js @@ -25,7 +25,7 @@ map.ui = new function(){ function down (e, cursor){ 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 ) -console.log(cursor+"") + if (e.ctrlKey || e.which === 3) { map.center.a = cursor.x.a + map.bounds.a * map.zoom map.center.b = -cursor.y.a + map.bounds.b * map.zoom @@ -55,8 +55,10 @@ console.log(cursor+"") } function move (e, cursor) { - 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 ) + cursor.x.div(w).sub(0.5) + cursor.y.div(h).sub(0.5) +// 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 ) } function drag (e, cursor) { |
