Browse Source

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 years ago
parent
commit
a92979f9bd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      macrovision.js

+ 2
- 2
macrovision.js View File

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



Loading…
Cancel
Save