wavedrom
wavedrom copied to clipboard
Label Width Over-Estimation
The label text box width embedded in the arcs is over-estimated in the presence of tspan tags.
Example: https://tinyurl.com/y382fvoz : generates the below waveform (note thlf between nodes c and d - the overstimation is evident in the transparent PNG or SVG where the text box is white in color)
Desired waveform for this would be as below
The arc's endpoints should not be overlaid with the text box.
A quick and dirty fix is modifying lib/text-width.js to add a line prior to the determination of the length of the string (which is how I generated the above desired image) - it is obviously better to filter out only the supported tspan tags - or, we could add a constraint that labels can't have any text of the format ' <.*> '.
str = str.replace(/<[^>]+>/g,'');
len = str.length;