Question about extra empty <tspan> generated when using textWrap #3064
-
IntroductionHello JointJS Team, I am using JointJS to render elements with the textWrap attribute enabled. Everything works well in terms of automatic line wrapping.
However, I noticed that for some text content, an extra empty with the class v-empty-line is being generated.
This extra empty sometimes causes problems when I have multiple section items in a diagram. It affects the layout. Could you please clarify: Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS, JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello, We are adding this empty line elements when the text is split in such way that there are empty lines, inluding the case when there is no text visible. It is done to make possible proper layouting of There is no option to remove these empty line elements but you can use |
Beta Was this translation helpful? Give feedback.
Hello,
We are adding this empty line elements when the text is split in such way that there are empty lines, inluding the case when there is no text visible. It is done to make possible proper layouting of
tspan
elements when there are multiple lines. Additionally, it allows user to interact with the empty text element (for example, user can click on it to edit it).There is no option to remove these empty line elements but you can use
v-empty-line
class to apply style which will hide the element.