Ver código fonte

Switch the scroll buttons

They now move the camera left and right, rather than shoving everything
left or right
tags/v0.1.0
Fen Dweller 6 anos atrás
pai
commit
e94d220645
1 arquivos alterados com 4 adições e 4 exclusões
  1. +4
    -4
      macrovision.js

+ 4
- 4
macrovision.js Ver arquivo

@@ -1579,28 +1579,28 @@ document.addEventListener("DOMContentLoaded", () => {
// TODO: write some generic logic for this lol

document.querySelector("#scroll-left").addEventListener("mousedown", e => {
scrollDirection = -1;
scrollDirection = 1;
clearInterval(scrollHandle);
scrollHandle = setInterval(doScroll, 1000/20);
e.stopPropagation();
});

document.querySelector("#scroll-right").addEventListener("mousedown", e => {
scrollDirection = 1;
scrollDirection = -1;
clearInterval(scrollHandle);
scrollHandle = setInterval(doScroll, 1000/20);
e.stopPropagation();
});

document.querySelector("#scroll-left").addEventListener("touchstart", e => {
scrollDirection = -1;
scrollDirection = 1;
clearInterval(scrollHandle);
scrollHandle = setInterval(doScroll, 1000/20);
e.stopPropagation();
});

document.querySelector("#scroll-right").addEventListener("touchstart", e => {
scrollDirection = 1;
scrollDirection = -1;
clearInterval(scrollHandle);
scrollHandle = setInterval(doScroll, 1000/20);
e.stopPropagation();


Carregando…
Cancelar
Salvar