Sfoglia il codice sorgente

Make shift-scrolling movement proportional to world height

master
Fen Dweller 5 anni fa
parent
commit
7e47fb2dd3
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +3
    -3
      macrovision.js

+ 3
- 3
macrovision.js Vedi File

@@ -1930,9 +1930,9 @@ document.addEventListener("DOMContentLoaded", () => {
updateViewOptions(entity, entity.view);
updateSizes(true);
} else {
document.querySelectorAll(".entity-box").forEach(element => {
element.dataset.x = parseFloat(element.dataset.x) + (e.deltaY < 0 ? 0.1 : -0.1);
});
const worldWidth = config.height.toNumber("meters") / canvasHeight * canvasWidth;
config.x += (e.deltaY > 0 ? 1 : -1) * worldWidth / 20 ;
updateSizes();
updateSizes();
}



Loading…
Annulla
Salva