Commit cb3d10e4 authored by Joel Collins's avatar Joel Collins
Browse files

Fixed scroll-to-focus

parent 95e10b14
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@
                <img src="./static/icons/baseline-camera_alt-24px.svg">
            </button>
        </div>
        <div id="streambox">No active stream</div>
        <div class="scrolltarget" id="streambox">No active stream</div>
      </div>

      <div class="column right" id="right-sb">
+4 −1
Original line number Diff line number Diff line
@@ -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