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();