Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label Width Over-Estimation #265

Open
Ganesh-AT opened this issue Oct 18, 2019 · 0 comments
Open

Label Width Over-Estimation #265

Ganesh-AT opened this issue Oct 18, 2019 · 0 comments
Labels

Comments

@Ganesh-AT
Copy link

Ganesh-AT commented Oct 18, 2019

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)

wavedrom(1)

Desired waveform for this would be as below

wavedrom(2)

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;
@drom drom added the bug 🪲 label May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants