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:
@@ -547,7 +547,7 @@ class RedoxSim {
|
||||
ctx.fillText(s.lbl, 14, y);
|
||||
ctx.fillStyle = (i === this._stepIdx && this._phase !== 'done') ? '#FFF' : 'rgba(255,255,255,0.62)';
|
||||
ctx.font = '9.5px monospace';
|
||||
ctx.fillText(s.txt, 14 + ctx.measureText(s.lbl).width + 8, y);
|
||||
ctx.fillText(ChemVisuals.cleanIcons(s.txt), 14 + ctx.measureText(s.lbl).width + 8, y);
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user