Procházet zdrojové kódy

Fix changing the units for a non-default view causing weird behavior

The defualt view was being referenced.
tags/v0.1.0
Fen Dweller před 6 roky
rodič
revize
a92979f9bd
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +2
    -2
      macrovision.js

+ 2
- 2
macrovision.js Zobrazit soubor

@@ -636,9 +636,9 @@ function configViewOptions(entity, view) {
select.addEventListener("input", e => {
const value = input.value == 0 ? 1 : input.value;
const oldUnit = select.getAttribute("oldUnit");
entity.views[view][key] = math.unit(value, oldUnit).to(select.value);
entity.views[entity.view][key] = math.unit(value, oldUnit).to(select.value);
entity.dirty = true;
setNumericInput(input, entity.views[view][key].toNumber(select.value));
setNumericInput(input, entity.views[entity.view][key].toNumber(select.value));

select.setAttribute("oldUnit", select.value);



Načítá se…
Zrušit
Uložit