summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/util
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/javascripts/rectangles/util')
-rw-r--r--public/assets/javascripts/rectangles/util/constants.js3
-rw-r--r--public/assets/javascripts/rectangles/util/wheel.js6
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
}