CentreForDigitalHumanities / CentreForDigitalHumanities/langpro-annotator
Minor alignment glitch in proof tableau
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 5d 11h
- Merged PRs (30d)
- 2
Description
@XanderVertegaal shared this gorgeous screenshot with me:
In nodes 4 and 6, the first line with the id label, head term and argument is left-aligned with the rule on the second line, instead of being centered on the tree branch. This is related to the following piece of code:
https://github.com/CentreForDigitalHumanities/langpro-annotator/blob/0ad5ca82bba744782a56652c7fdde266deef8c39/frontend/src/app/annotate/tableau-svg/tableau-node.component.ts#L72-L79
In a prior version, `totalW` used to be the same value as `mainW` (in fact there was no separate `mainW`). The alignment of the first line of each node is still based on the (now false) assumption that `totalW` reflects the width of the top line. Hence, if the rule is wider than the first line (which is rare), the first line is left-aligned with the rule.
Solution: make `mainW` a property of the component and use this for alignment of the first line instead of `totalW`.
Side note: `totalW` is still needed to prevent nodes on adjacent branches from overlapping.
Contributor guide
Assessment
This issue has not been assessed yet.