Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/data/AutoScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ chrome.storage.local.get(defaults, function (options) {
dirY: 0,

click: false,
scrolling: false
scrolling: false,

wheelX: 0,
wheelY: 0
}

var htmlNamespace = "http://www.w3.org/1999/xhtml"
Expand Down Expand Up @@ -137,6 +140,11 @@ chrome.storage.local.get(defaults, function (options) {
scrollY = scrollHeight
}

scrollX += (state.wheelX)
scrollY += (state.wheelY)
state.wheelX = 0
state.wheelY = 0

// This is needed to support SVG
if (root) {
// This triggers a reflow
Expand Down Expand Up @@ -191,6 +199,8 @@ chrome.storage.local.get(defaults, function (options) {
function mousewheel(event) {
// TODO is this a good idea ?
stopEvent(event, true)
state.wheelX += event.deltaX
state.wheelY += event.deltaY
}

function mousemove(event) {
Expand Down