Ver código fonte

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

The defualt view was being referenced.
tags/v0.1.0
Fen Dweller 6 anos atrás
pai
commit
a92979f9bd
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      macrovision.js

+ 2
- 2
macrovision.js Ver arquivo

@@ -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);



Carregando…
Cancelar
Salvar