x-axis justierung: lines 4
This commit is contained in:
@@ -801,15 +801,18 @@ async function initRunSelectors() {
|
|||||||
runs5.map(r => `<option value="${r}"${r === cur ? ' selected' : ''}>${r}</option>`).join('');
|
runs5.map(r => `<option value="${r}"${r === cur ? ' selected' : ''}>${r}</option>`).join('');
|
||||||
}
|
}
|
||||||
if (selC) {
|
if (selC) {
|
||||||
// Default: zweiten neuesten Run vorwählen (falls vorhanden und noch kein Wert gesetzt)
|
// URL-Param ?compare=none → kein Default-Vergleich (Board-Tab)
|
||||||
|
// Ohne den Param → zweiten neuesten Run vorwählen (X-Achsen-Tab)
|
||||||
|
const noCompare = new URLSearchParams(window.location.search).get('compare') === 'none';
|
||||||
const prevCompare = selC.value;
|
const prevCompare = selC.value;
|
||||||
selC.innerHTML = '<option value="">– keiner –</option>' +
|
selC.innerHTML = '<option value="">– keiner –</option>' +
|
||||||
runs10.map(r => `<option value="${r}">${r}</option>`).join('');
|
runs10.map(r => `<option value="${r}">${r}</option>`).join('');
|
||||||
if (prevCompare) {
|
if (prevCompare) {
|
||||||
selC.value = prevCompare; // bisher gewählten behalten
|
selC.value = prevCompare; // bisher gewählten behalten
|
||||||
} else if (runs10.length >= 2) {
|
} else if (!noCompare && runs10.length >= 2) {
|
||||||
selC.value = runs10[1]; // zweiter neuester als Default
|
selC.value = runs10[1]; // zweiter neuester als Default (X-Achse)
|
||||||
}
|
}
|
||||||
|
// Andernfalls bleibt "– keiner –" aktiv (Board-Tab mit ?compare=none)
|
||||||
}
|
}
|
||||||
} catch { /* offline oder noch keine Runs */ }
|
} catch { /* offline oder noch keine Runs */ }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<iframe
|
<iframe
|
||||||
id="board-viewer-frame"
|
id="board-viewer-frame"
|
||||||
src="/boardViewer.html"
|
src="/boardViewer.html?compare=none"
|
||||||
style="width: 100%; height: 740px; border: 1px solid #334155; border-radius: 6px; background: #0d0f13; display: block;"
|
style="width: 100%; height: 740px; border: 1px solid #334155; border-radius: 6px; background: #0d0f13; display: block;"
|
||||||
title="Board-Viewer"
|
title="Board-Viewer"
|
||||||
></iframe>
|
></iframe>
|
||||||
|
|||||||
@@ -45,14 +45,13 @@
|
|||||||
Rechts ➡
|
Rechts ➡
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap">
|
<div class="controls" style="margin-top:16px">
|
||||||
<button id="btn-xaxis-adopt" disabled
|
<button id="btn-xaxis-adopt" disabled
|
||||||
style="padding:5px 18px;opacity:.45;cursor:not-allowed;border:1px solid #4a9eff;border-radius:3px;background:#1e293b;color:#c8cdd8;font:inherit;font-size:12px"
|
title="Gemessene X-Achsen-Richtung in robot.json übernehmen – erst nach einer Messung aktiv">
|
||||||
title="Gemessene X-Achsen-Richtung in robot.json übernehmen – folgt">
|
|
||||||
X-Achse übernehmen
|
X-Achse übernehmen
|
||||||
</button>
|
</button>
|
||||||
<span style="font-size:11px;color:var(--muted)">
|
<span style="font-size:11px;color:var(--muted)">
|
||||||
Übernimmt die gemessene Richtung (aus Basis- und Vergleichs-Run) als X-Achse in robot.json
|
Wird aktiv sobald der Viewer eine Bewegungsrichtung berechnet hat.
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user