Преглед изворни кода

Fix the scale showing the wrong units

Units that didn't match the internal base unit
were showing up wrongly.
master
Fen Dweller пре 5 година
родитељ
комит
8dec391e4b
1 измењених фајлова са 3 додато и 2 уклоњено
  1. +3
    -2
      macrovision.js

+ 3
- 2
macrovision.js Прегледај датотеку

@@ -282,6 +282,7 @@ function drawScale(ifDirty = false) {
return;
function drawTicks(/** @type {CanvasRenderingContext2D} */ ctx, pixelsPer, heightPer) {
let total = heightPer.clone();
console.log(total)
total.value = 0;
for (let y = ctx.canvas.clientHeight - 50; y >= 50; y -= pixelsPer) {
drawTick(ctx, 50, y, total);
@@ -345,7 +346,7 @@ function drawScale(ifDirty = false) {
pixelsPer /= factor;
}

heightPer = math.unit(heightPer, config.height.units[0].unit.name)
heightPer = math.unit(heightPer, document.querySelector("#options-height-unit").value);

ctx.scale(1, 1);
@@ -832,7 +833,7 @@ function configViewOptions(entity, view) {
})

select.setAttribute("oldUnit", select.value);
setNumericInput(input, entity.views[view][key].toNumber(select.value));

// TODO does this ever cause a change in the world?


Loading…
Откажи
Сачувај