fix: три бага — drawGlow closure, replaceChild null guard, stoich text overflow

This commit is contained in:
Maxim Dolgolyov
2026-05-26 15:38:37 +03:00
parent 7a323f8fe0
commit 9ef9443096
3 changed files with 15 additions and 7 deletions
+8 -1
View File
@@ -2836,7 +2836,14 @@ class InterferenceSim {
if (window.LabFX && LabFX.glow && !white) {
const r1b = Math.sqrt(0.5 * nm * 1e-6 * R) * scale;
LabFX.glow.drawGlow(ctx, cx, cy, r1b, wavelengthToRGB(nm), 18);
const ringColor = wavelengthToRGB(nm);
LabFX.glow.drawGlow(ctx, function() {
ctx.beginPath();
ctx.arc(cx, cy, r1b, 0, Math.PI * 2);
ctx.strokeStyle = ringColor;
ctx.lineWidth = 2;
ctx.stroke();
}, { color: ringColor, intensity: 18 });
}
ctx.beginPath(); ctx.arc(cx, cy, maxR_mm * scale * 1.05, 0, Math.PI * 2);