From dfce94fbf7b8f8d8dadd1f7d7482287dbb5388e4 Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Sat, 30 May 2026 13:00:42 +0300 Subject: [PATCH] =?UTF-8?q?fix(opticsbench):=20=D0=BF=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D1=8F=D0=BD=D0=BD=D1=8B=D0=B9=20=D1=87=D0=B8=D0=BF=20?= =?UTF-8?q?=C2=AB=D0=98=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=C2=BB=20?= =?UTF-8?q?+=20=D0=B2=D0=BE=D1=81=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=93=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0/=D0=9F=D0=BB?= =?UTF-8?q?=D0=B0=D1=81=D1=82=D0=B8=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - выбор источника теперь всегда доступен: чип «Источник» в списке схемы (раньше — только кликом по точке на холсте); источник выбран по умолчанию - восстановлены потерянные кнопки палитры «+ Граница» / «+ Пластина» - bump opticsbench.js?v=6 Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/js/labs/opticsbench.js | 9 ++++++--- frontend/lab.html | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/js/labs/opticsbench.js b/frontend/js/labs/opticsbench.js index f77db02..3dda0ce 100644 --- a/frontend/js/labs/opticsbench.js +++ b/frontend/js/labs/opticsbench.js @@ -2551,7 +2551,7 @@ class BenchSim { this._mk('lens', { xf: 0.40, f: 130, ap: 95 }), this._mk('screen', { xf: 0.86 }), ]; - this.selectedId = null; + this.selectedId = '__src'; // source selected by default so its controls show on open this._bindEvents(); this._ro = new ResizeObserver(() => { this.fit(); this.draw(); }); this._ro.observe(canvas.parentElement || canvas); @@ -4413,10 +4413,13 @@ function _benchUpdateUI() { if (!benchSim) return; const listEl = document.getElementById('bench-list'); if (listEl) { - listEl.innerHTML = benchSim.elements.map(e => + // permanent "Источник" chip so the source is always selectable (not only via canvas) + const srcChip = ''; + listEl.innerHTML = srcChip + benchSim.elements.map(e => '' - ).join('') || '
Пусто
'; + ).join(''); } const propsEl = document.getElementById('bench-props'); if (propsEl) propsEl.innerHTML = _benchPropsHTML(); diff --git a/frontend/lab.html b/frontend/lab.html index f1eaf0e..400a371 100644 --- a/frontend/lab.html +++ b/frontend/lab.html @@ -3194,6 +3194,8 @@ + +
Схема
@@ -4844,7 +4846,7 @@ - +