Merge pull request #1760 from adamjimenez/patch-21

shift+mousewheel to horiz scroll
This commit is contained in:
Harutyun Amirjanyan 2014-01-14 07:26:00 -08:00
commit ac99690429

View file

@ -235,8 +235,15 @@ function DefaultHandlers(mouseHandler) {
};
this.onMouseWheel = function(ev) {
if (ev.getShiftKey() || ev.getAccelKey())
if (ev.getAccelKey())
return;
//shift wheel to horiz scroll
if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {
ev.wheelX = ev.wheelY;
ev.wheelY = 0;
}
var t = ev.domEvent.timeStamp;
var dt = t - (this.$lastScrollTime||0);