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

Last word in comment boxes getting cut off by word wrap library : ( #195

Closed
harlantwood opened this issue Aug 11, 2015 · 4 comments
Closed
Milestone

Comments

@harlantwood
Copy link

See screenshot -- this is from the Atom preview, but same issue in Chrome/Yosemite.

I opened a PR in d3textwrap (vijithassar/d3-textwrap#8) around this. I tested this code in a custom Mermaid build and it did fix the issue, though it messed up alignment a bit.

Another option would be to switch to d3plus, which appears to have robust text wrapping: http://d3plus.org/examples/utilities/a39f0c3fc52804ee859a/ -- Note that if you include the head version of d3plus, it now builds correctly in browserify.

@knsv
Copy link
Collaborator

knsv commented Aug 12, 2015

Thanks for pointing this out and thanks for your effort with the PR. I am sure you are not the only one that has experienced this.

I started out looking at d3plus but chose not use it as the size of it would more then double the size of mermaid. I will take a look at the PR and see what if I can incorporate it (ahead of time)!

@harlantwood
Copy link
Author

Excellent, thanks. And thanks for a great library, we are loving mermaid!

As a workaround, we found that adding '\n' to the end of a comment fixes the appearance in all cases, ie the last word always shows up.

Regarding d3plus, maybe it is relatively easy to extract the text wrap component? Maybe it can/should be pulled into it's own node module and included by d3plus, mermaid, and others... Just an idle thought : )

knsv added a commit that referenced this issue Sep 26, 2015
Fix for issue #195, text wrap in sequence diagrams drops last word
Documentation
@knsv knsv added the Fixed label Sep 28, 2015
@knsv knsv added this to the 0.5.2 milestone Oct 4, 2015
@knsv
Copy link
Collaborator

knsv commented Oct 4, 2015

Fix for this issue was released in mermaid 0.5.2. Will close this now, let me know if you issues still remain.

@knsv knsv closed this as completed Oct 4, 2015
@harlantwood
Copy link
Author

Excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants