Fixed scroll-to-focus
This commit is contained in:
parent
95e10b14dc
commit
cb3d10e467
2 changed files with 5 additions and 2 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue