Move overlay toggle into calibration visual editor, add tutorial step

Place the overlay button inside the preview screen as a pill toggle,
add it as a tutorial step that auto-skips in device calibration mode.
Tutorial engine now skips hidden/missing targets in both directions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 00:50:39 +03:00
parent f2f67493b1
commit 68ce394ccc
6 changed files with 53 additions and 14 deletions

View File

@@ -93,13 +93,7 @@ async function _clearCSSTestMode() {
function _setOverlayBtnActive(active) {
const btn = document.getElementById('calibration-overlay-btn');
if (!btn) return;
if (active) {
btn.style.background = 'var(--primary-color)';
btn.style.color = 'white';
} else {
btn.style.background = '';
btn.style.color = '';
}
btn.classList.toggle('active', active);
}
async function _checkOverlayStatus(cssId) {
@@ -166,7 +160,6 @@ export async function showCalibration(deviceId) {
document.getElementById('cal-device-led-count-inline').textContent = device.led_count;
document.getElementById('cal-css-led-count-group').style.display = 'none';
document.getElementById('calibration-overlay-btn').style.display = 'none';
document.getElementById('calibration-tutorial-btn').style.marginLeft = '';
document.getElementById('cal-start-position').value = calibration.start_position;
document.getElementById('cal-layout').value = calibration.layout;
@@ -324,7 +317,6 @@ export async function showCSSCalibration(cssId) {
_overlayStartedHere = false;
const overlayBtn = document.getElementById('calibration-overlay-btn');
overlayBtn.style.display = '';
document.getElementById('calibration-tutorial-btn').style.marginLeft = '0';
_setOverlayBtnActive(false);
_checkOverlayStatus(cssId);