-
I have figure with text on it. I want to set figure maximum width. And if text width is more then figure width i want text autowrap. Can i do this in glsp? original thread by MoHcmp |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi, AFAIK, text autowrap is currently not supported by GLSP (Because it relies on SVG for rendering, which doesn't support Text wrap). You'll need to provide a custom View for your Label, and manually add new lines where you want to cut the text. Alternatively, you can use an HTML Div for rendering the Text, and let the Div handle the word-wrapping for you. HTH, |
Beta Was this translation helpful? Give feedback.
-
Hi, right as Camille says there is no SVG-native support for this in GLSP and Sprotty. However, you can use |
Beta Was this translation helpful? Give feedback.
-
With |
Beta Was this translation helpful? Give feedback.
-
The foreign object can take the fixed width of the parent |
Beta Was this translation helpful? Give feedback.
-
[MoHcmp] Thank you for fast answer |
Beta Was this translation helpful? Give feedback.
Hi, right as Camille says there is no SVG-native support for this in GLSP and Sprotty. However, you can use
foreignObjects
. We've introduced support in Sprotty for that, see eclipse-sprotty/sprotty#171