From 1a6d4a76c3160b011161b8ea3989aeab331b0a01 Mon Sep 17 00:00:00 2001 From: Maxim Dolgolyov Date: Mon, 1 Jun 2026 11:35:00 +0300 Subject: [PATCH] =?UTF-8?q?fix(phys7=20ch1):=20=C2=A77=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D1=83=D0=BB=D0=B0=20=D1=86=D0=B5=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=B4=D0=B5=D1=80=D0=B8=D0=BB=D0=B0=D1=81?= =?UTF-8?q?=D1=8C=20=E2=80=94=20\dfrac=20=D0=B1=D1=8B=D0=BB=20=D1=80=D0=B0?= =?UTF-8?q?=D0=B7=D0=BE=D1=80=D0=B2=D0=B0=D0=BD=20=D0=BC=D0=B5=D0=B6=D0=B4?= =?UTF-8?q?=D1=83=20$-=D1=81=D0=BF=D0=B0=D0=BD=D0=B0=D0=BC=D0=B8=20(=D0=B5?= =?UTF-8?q?=D0=B4=D0=B8=D0=BD=D1=8B=D0=B9=20KaTeX=20+=20=D1=80=D0=B5-?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=B4=D0=B5=D1=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/js/phys7_ch1_widgets.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/js/phys7_ch1_widgets.js b/frontend/js/phys7_ch1_widgets.js index d459ef3..4c0a2c6 100644 --- a/frontend/js/phys7_ch1_widgets.js +++ b/frontend/js/phys7_ch1_widgets.js @@ -898,8 +898,8 @@ function add_p7(){ + '' + '' + '
' - + 'Цена деления: $C = \\dfrac{X_2 - X_1}{N} = \\dfrac{$10$ - $0$}{$10$} = $ 1' - + '
Погрешность: $\\Delta X = C/2 = $ 0,5' + + 'Цена деления: ' + + '
Погрешность: ' + '
'); /* IV-3: DnD — соедини прибор с подходящей ценой деления */ @@ -981,11 +981,12 @@ function add_p7(){ document.getElementById('p7-x2').textContent = x2; document.getElementById('p7-N').textContent = N; const C = (x2 - x1) / N; - document.getElementById('p7-cd2-x1').textContent = x1; - document.getElementById('p7-cd2-x2').textContent = x2; - document.getElementById('p7-cd2-N').textContent = N; - document.getElementById('p7-cd2').textContent = (+C.toPrecision(4)).toString().replace('.', ','); - document.getElementById('p7-dx').textContent = (+(C/2).toPrecision(4)).toString().replace('.', ','); + const Cltx = (+C.toPrecision(4)).toString().replace('.', '{,}'); + const dxLtx = (+(C / 2).toPrecision(4)).toString().replace('.', '{,}'); + const cdEq = document.getElementById('p7-cd2-eq'); + const dxEq = document.getElementById('p7-dx-eq'); + if(cdEq){ cdEq.textContent = '$C = \\dfrac{X_2 - X_1}{N} = \\dfrac{' + x2 + ' - ' + x1 + '}{' + N + '} = ' + Cltx + '$'; renderMath(cdEq); } + if(dxEq){ dxEq.textContent = '$\\Delta X = C/2 = ' + dxLtx + '$'; renderMath(dxEq); } }; ['p7-x1-r','p7-x2-r','p7-N-r'].forEach(id => document.getElementById(id).addEventListener('input', updCalc)); updCalc();