Чистка
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
// app.js (оркестратор)
|
||||||
import { fetchHealth, fetchHistory } from "./data.js";
|
import { fetchHealth, fetchHistory } from "./data.js";
|
||||||
import { state, smooth, addSignal } from "./state.js";
|
import { state, smooth, addSignal } from "./state.js";
|
||||||
import {
|
import {
|
||||||
@@ -47,7 +48,6 @@ async function update() {
|
|||||||
setBars(smooth(percent));
|
setBars(smooth(percent));
|
||||||
setSignal(level);
|
setSignal(level);
|
||||||
|
|
||||||
// 🔥 ВОТ ЭТО ТЫ ПОТЕРЯЛ
|
|
||||||
if (DOM.lastByte) {
|
if (DOM.lastByte) {
|
||||||
DOM.lastByte.textContent = value;
|
DOM.lastByte.textContent = value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export function drawChart(canvas, history) {
|
|||||||
|
|
||||||
for (let i = 0; i < history.length; i++) {
|
for (let i = 0; i < history.length; i++) {
|
||||||
const x = i * stepX;
|
const x = i * stepX;
|
||||||
const y = h - history[i].value * scaleY; // 👈 FIX
|
const y = h - history[i].value * scaleY;
|
||||||
|
|
||||||
if (i === 0) ctx.moveTo(x, y);
|
if (i === 0) ctx.moveTo(x, y);
|
||||||
else ctx.lineTo(x, y);
|
else ctx.lineTo(x, y);
|
||||||
|
|||||||
Reference in New Issue
Block a user