fix(labs): SVG-стрелки уравнений рисовались как сырой текст на canvas
Уравнения реакций содержат inline <svg class=ic> стрелки. На canvas (fillText) разметка показывалась буквально. Добавлен общий хелпер ChemVisuals.cleanIcons (SVG→Unicode →/↑/↓), применён в flask (eq), redox (s.txt) и chemsandbox (ответ квиза — был единственный незакрытый путь мимо _csClean). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1146,7 +1146,7 @@ class FlaskSim {
|
||||
const eqY = g.cy + g.r + 26;
|
||||
|
||||
ctx.font = '12.5px monospace'; ctx.fillStyle = 'rgba(185,215,255,0.78)';
|
||||
ctx.textAlign = 'center'; ctx.fillText(eq, W * 0.44, eqY); ctx.textAlign = 'left';
|
||||
ctx.textAlign = 'center'; ctx.fillText(ChemVisuals.cleanIcons(eq), W * 0.44, eqY); ctx.textAlign = 'left';
|
||||
|
||||
if (this._passiv) {
|
||||
ctx.font = 'bold 11px sans-serif'; ctx.fillStyle = '#FFD166';
|
||||
|
||||
Reference in New Issue
Block a user