Fix tree layout on failed let

This commit is contained in:
Arne Keller 2021-02-10 08:08:46 +01:00
parent cadc299791
commit 54da12a132

View File

@ -163,6 +163,7 @@ class MathjaxProofTree extends MathjaxAdapter {
}
parentNode = parentNode.childNodes[2] as SVGGraphicsElement;
const rule = node.querySelector<SVGGraphicsElement>('g [semantics="bspr_inferenceRule:down"]')!;
if (rule !== null) {
// this selector should be checked again when updating MathJax
const term = rule.childNodes[1].childNodes[0].childNodes[0].childNodes[1].childNodes[0] as SVGGraphicsElement;
// @ts-ignore
@ -171,6 +172,7 @@ class MathjaxProofTree extends MathjaxAdapter {
w += padding;
parentNode.setAttribute("x2", w.toString());
}
}
i += 1;
}
}