finishing touches

This commit is contained in:
2026-01-01 15:24:08 +10:00
parent c09b7b5769
commit 9fef1e5b0d
3 changed files with 126 additions and 65 deletions

View File

@@ -166,19 +166,19 @@ function displayTable(calcResults) {
let table = elements.outputsTable;
table.innerHTML = ""; // Clear previous content
let header = "<tr><th>Parameter</th><th>Value</th></tr>";
let header = "<tr><th>Параметр</th><th>Значение</th></tr>";
let rows = "";
if (outputFields.radius) {
rows += `<tr><td>Radius</td><td>${calcResults.radius.toFixed(3)}</td></tr>`;
rows += `<tr><td>R</td><td>${calcResults.radius.toFixed(3)}</td></tr>`;
}
if (outputFields.heights) {
rows += `<tr><td>Height 1</td><td>${calcResults.heights[0].toFixed(3)}</td></tr>`;
rows += `<tr><td>Height 2</td><td>${calcResults.heights[1].toFixed(3)}</td></tr>`;
rows += `<tr><td>h1</td><td>${calcResults.heights[0].toFixed(3)}</td></tr>`;
rows += `<tr><td>h2</td><td>${calcResults.heights[1].toFixed(3)}</td></tr>`;
}
if (outputFields.lengths) {
rows += `<tr><td>Length 1</td><td>${calcResults.lengths[0].toFixed(3)}</td></tr>`;
rows += `<tr><td>Length 2</td><td>${calcResults.lengths[1].toFixed(3)}</td></tr>`;
rows += `<tr><td>A</td><td>${calcResults.lengths[0].toFixed(3)}</td></tr>`;
rows += `<tr><td>B</td><td>${calcResults.lengths[1].toFixed(3)}</td></tr>`;
}
table.innerHTML = header + rows;