Sfoglia il codice sorgente

Set the world height input correctly when auto-sizing the world

tags/v0.0.5
Fen Dweller 5 anni fa
parent
commit
52dcdc909d
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. +2
    -0
      macrovision.js

+ 2
- 0
macrovision.js Vedi File

@@ -898,6 +898,8 @@ function updateWorldHeight() {
function setWorldHeight(oldHeight, newHeight) { function setWorldHeight(oldHeight, newHeight) {
config.height = newHeight; config.height = newHeight;


const unit = document.querySelector("#options-height-unit").value;
document.querySelector("#options-height-value").value = config.height.toNumber(unit);
Object.entries(entities).forEach(([key, entity]) => { Object.entries(entities).forEach(([key, entity]) => {
const element = document.querySelector("#entity-" + key); const element = document.querySelector("#entity-" + key);
const newPosition = adjustAbs({ x: element.dataset.x, y: element.dataset.y }, oldHeight, config.height); const newPosition = adjustAbs({ x: element.dataset.x, y: element.dataset.y }, oldHeight, config.height);


Loading…
Annulla
Salva