Исправление анимации историей принятых данных

This commit is contained in:
Maxim
2026-05-08 10:11:25 +03:00
parent eb6a32e495
commit 4fec48c78c
3 changed files with 24 additions and 1 deletions

View File

@@ -282,4 +282,24 @@ h1 {
#history {
margin: 0;
}
.accordion-header {
cursor: pointer;
user-select: none;
transition: background-color 0.2s;
}
.accordion-header:hover {
background-color: rgba(255, 255, 255, 0.05);
}
.accordion-body {
overflow: hidden;
transition: max-height 0.3s ease-out;
max-height: 2000px;
}
.accordion-body.collapsed {
max-height: 0;
}

View File

@@ -7,6 +7,7 @@ export function initAccordion() {
let open = false;
DOM.historyBody.classList.add("collapsed");
DOM.historyHeader.textContent = "▶ ПРИНЯТЫЕ ДАННЫЕ";
DOM.historyHeader.addEventListener("click", () => {
open = !open;

View File

@@ -8,8 +8,10 @@ export function initDOM() {
DOM.lastByte = document.getElementById("last-byte");
DOM.history = document.getElementById("history");
DOM.canvas = document.getElementById("signalChart");
DOM.bars = document.querySelectorAll(".sig-bar");
DOM.historyHeader = document.getElementById("history-header");
DOM.historyBody = document.getElementById("history-body");
}
export function setStatus(v) {