znai
znai copied to clipboard
flow charts: email shape does not render multiple lines
Example flow chart json:
{
"nodes": [
{
"id": "foo",
"label": "foo\nbar"
},
{
"id": "bar",
"label": "foo\nbar",
"shape": "email"
}
],
"edges": [
["foo", "bar"]
]
}
Rendered flow chart:

As you can see the default shape renders the multiple lines correctly, the email shape does not.
I've also encountered this with the database shape so I wonder if this is a problem with anything other than the default rectangle.
I have observed the same issue when specifying colorGroup
@suhasdara thanks for letting me know. Do you use a regular shape? Any chance you can elaborate on your full use case?
Yes I use a regular shape but with different colors. Essentially I need my nodes to be one of two colors. My labels also contain the newline character and I have exactly the same issue as what the original person reported when explicitly setting colorGroup: "b". I tried using highlight instead of colorGroup and that causes the same problem as well. Essentially, any formatting of the node other than the default seems to cause the problem.
@suhasdara thank you for the pointers. I am able to reproduce now. Working on a fix. Still curios what do you use diagrams for! If you have a moment, could you please post here - https://github.com/testingisdocumenting/znai/discussions/824 ?
this has been released as 1.62: https://testingisdocumenting.org/znai/release-notes/2022#1-62