Fixed scroll-to-focus

This commit is contained in:
Joel Collins 2019-01-18 16:57:06 +00:00
parent 95e10b14dc
commit cb3d10e467
2 changed files with 5 additions and 2 deletions

View file

@ -281,12 +281,15 @@ function clickHotspotImage(event) {
window.addEventListener('wheel', function(e) {
multiplier = 1/100;
z_delta = e.deltaY * multiplier * focusVelocity;
if ((document.getElementById("scrollFocusCheck").checked == true) && (e.target.parentNode.classList.value == "column middle")) {
if ((document.getElementById("scrollFocusCheck").checked == true) && (e.target.parentNode.classList.value == "scrolltarget")) {
console.log(z_delta);
console.log(e.target.parentNode.classList.value);
// Make a position request
safeRequest("POST", baseURI+"/stage/position", { "absolute": false, "z": z_delta}, keyMoveCallback)
}
else {
console.log("Scroll-to-focus inactive")
}
});
// Keyboard to move