hediet / vscode-drawio

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.
https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio
GNU General Public License v3.0
9.09k stars 414 forks source link

Shapes text get cut off if wider that shape #378

Open Arch-Stalker opened 1 year ago

Arch-Stalker commented 1 year ago

If you add text to a shape (by double clicking the shape so it appears right under the shape) then the text gets cut off if the text is wider than the shape. Also having the text multi line does not help as the text will not show as multi line.

Note that when looking at the embedded drawio.svg images in VS code preview mode, all looks ok, but when I push the .md files to Azure DevOps Wiki, that is when the problems occur.

For example in vscode I create this:

from vs code

and it looks like that in preview as well

but in Azure DevOps wiki it looks like this:

from azure

This behavior does not apply to imported images, any text added below an imported image works as it should.

The multiline problem is present also in separate text objects, ergo if I pick general -> text and use enter to make it multi line, all looks well in the extensions editor page and in vs code preview, but in DevOps the text is handled as single line and gets cut off at the defined width of the text box

My guess is that there are 2 problems: 1) Separate text boxes and shape text boxes use line breaks that do not register correctly in DevOps Wiki md files 2) The text box widths are enforced, meaning the text width can not exceed the width reserved for the text box, which is not how it should work and causes problems especially with shape texts as the max text width is the shapes width

n-athan commented 10 months ago

Is there already a way to fix this? For now I use .png instead. The text is displayed correctly in Azure DevOps wiki pages then, but the quality is less.

kuntergunt commented 7 months ago

This issue is still not solved. Text that is longer than a few characters gets cut off. I also checked, the SVG is modified by the service (devops), so the browser already gets the cut off text.