diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-10-16 16:06:47 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-10-16 16:06:47 -0400 |
| commit | 6842a993ac6aef50e79a08df9fcb0a1d769592a1 (patch) | |
| tree | e210630d2d544eb6db5e6b8c46dfa86ed1192915 /public/assets/javascripts/rectangles/util | |
| parent | 6733c7626f109373bcd526a1e1707c9ccfee75a8 (diff) | |
| parent | e25af0a7106c359faae2f73a7c2295ea93db8341 (diff) | |
merge
Diffstat (limited to 'public/assets/javascripts/rectangles/util')
| -rw-r--r-- | public/assets/javascripts/rectangles/util/constants.js | 3 | ||||
| -rw-r--r-- | public/assets/javascripts/rectangles/util/wheel.js | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/public/assets/javascripts/rectangles/util/constants.js b/public/assets/javascripts/rectangles/util/constants.js index a38325e..3bc314c 100644 --- a/public/assets/javascripts/rectangles/util/constants.js +++ b/public/assets/javascripts/rectangles/util/constants.js @@ -21,7 +21,8 @@ var height_min = 200, side_max = 5000, resize_margin = 8, cursor_amp = 1.5, - DEFAULT_PICTURE_WIDTH = 400 + DEFAULT_PICTURE_WIDTH = 350, + MAP_GRID_SIZE = 360 // 10 feet var painting_distance_from_wall = 10, dot_distance_from_picture = 3 diff --git a/public/assets/javascripts/rectangles/util/wheel.js b/public/assets/javascripts/rectangles/util/wheel.js index 64aaa64..712d470 100644 --- a/public/assets/javascripts/rectangles/util/wheel.js +++ b/public/assets/javascripts/rectangles/util/wheel.js @@ -38,7 +38,11 @@ function wheel (opt) { var deltaX = 0, deltaY = 0; // WebKit - if ( event.wheelDeltaY ) { + if ( event.deltaY ) { + deltaY -= event.deltaY * opt.ratio + deltaX -= event.deltaX * opt.ratio + } + else if ( event.wheelDeltaY ) { deltaY -= event.wheelDeltaY * opt.ratio deltaX -= event.wheelDeltaX * opt.ratio } |
