From 11fcd09a9965ee42196b964ea21867f0932fc6ec Mon Sep 17 00:00:00 2001 From: Hyunje Jun Date: Tue, 18 Oct 2016 11:55:03 +0900 Subject: [PATCH] Reverse wheel scroll axis on shift pressed Resolve #548. --- src/js/plugin/handler/mouse-wheel.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/plugin/handler/mouse-wheel.js b/src/js/plugin/handler/mouse-wheel.js index 86677e7..a861619 100644 --- a/src/js/plugin/handler/mouse-wheel.js +++ b/src/js/plugin/handler/mouse-wheel.js @@ -52,6 +52,10 @@ function bindMouseWheelHandler(element, i) { deltaY = e.wheelDelta; } + if (e.shiftKey) { + // reverse axis with shift key + return [-deltaY, -deltaX]; + } return [deltaX, deltaY]; }