shift+mousewheel to horiz scroll

Converts shift+mousewheel to horizontal scroll.
This is in accordance with Chrome which supports this shortcut on webpages and textareas.
This commit is contained in:
Adam Jimenez 2014-01-13 09:46:53 +00:00
commit fb233da532

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);