mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-10 03:10:44 +00:00
Fix tree layout on failed let
This commit is contained in:
parent
cadc299791
commit
54da12a132
@ -163,13 +163,15 @@ class MathjaxProofTree extends MathjaxAdapter {
|
||||
}
|
||||
parentNode = parentNode.childNodes[2] as SVGGraphicsElement;
|
||||
const rule = node.querySelector<SVGGraphicsElement>('g [semantics="bspr_inferenceRule:down"]')!;
|
||||
// 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
|
||||
let w = -parentNode.getTransformToElement(term).e;
|
||||
w += term.getBBox().width;
|
||||
w += padding;
|
||||
parentNode.setAttribute("x2", w.toString());
|
||||
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
|
||||
let w = -parentNode.getTransformToElement(term).e;
|
||||
w += term.getBBox().width;
|
||||
w += padding;
|
||||
parentNode.setAttribute("x2", w.toString());
|
||||
}
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user