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:
@@ -1562,7 +1562,7 @@ class ChemSandboxSim {
|
||||
if (!isOk && this._quizTask) {
|
||||
ctx.font = '10px "JetBrains Mono", monospace';
|
||||
ctx.fillStyle = `rgba(255,255,255,${alpha * 0.45})`;
|
||||
ctx.fillText('Ответ: ' + this._quizTask.rx.eq, W / 2, bannerY + 65);
|
||||
ctx.fillText('Ответ: ' + _csClean(this._quizTask.rx.eq), W / 2, bannerY + 65);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user