From 39bd4b9dca66403783e5b0fab48e3cdbf4882269 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Tue, 14 Oct 2014 12:27:48 -0400 Subject: wheel tests; scroll up-down to move forward/back --- public/assets/javascripts/rectangles/engine/map/ui_editor.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'public/assets/javascripts/rectangles/engine/map/ui_editor.js') diff --git a/public/assets/javascripts/rectangles/engine/map/ui_editor.js b/public/assets/javascripts/rectangles/engine/map/ui_editor.js index 60c745e..072ff7e 100644 --- a/public/assets/javascripts/rectangles/engine/map/ui_editor.js +++ b/public/assets/javascripts/rectangles/engine/map/ui_editor.js @@ -203,7 +203,7 @@ Map.UI.Editor = function(map){ var wheelState, wheelTimeout - function mousewheel (e, val, delta){ + function mousewheel (e, deltaY, deltaX){ var cursor = base.mouse.cursor var intersects = Rooms.filter(function(r){ @@ -213,7 +213,7 @@ Map.UI.Editor = function(map){ if (intersects.length) { wheelState = wheelState || intersects[0].copy() - intersects[0].height = clamp( ~~(intersects[0].height - delta), height_min, height_max ) + intersects[0].height = clamp( ~~(intersects[0].height - deltaY), height_min, height_max ) clearTimeout(wheelTimeout) wheelTimeout = setTimeout(function(){ @@ -227,7 +227,7 @@ Map.UI.Editor = function(map){ }, 500) } else { - map.set_zoom(map.zoom_exponent - delta/20) + map.set_zoom(map.zoom_exponent - deltaY/20) } } -- cgit v1.2.3-70-g09d2