Panel Background does not correctly wrap TextBlock (Tooltip)

Hey,

using a Panel with background-color and adding a TextBlock to it, for some reason the background does not wrap the TextBlock correctly.

TooltipCode:

toolTip: new Adornment(Panel.Spot, {
      background: 'white',
}).add(new TextBlock().bind('text', 'name')),

Image:

For longer texts, the problem is even worse.
Any Idea what could cause this problem?

Thanks in advance

Do you have the same behavior in different browsers or on different types of hardware or platforms?

Are you using any custom fonts?

What happens if you remove all CSS from your page?

This works as Iā€™d expect: Edit fiddle - JSFiddle - Code Playground

1 Like

Actually, it seems like I only have this problem with Chromium (Chrome / Vivaldi). Within Firefox and Safari, everything looks ok.

Firefox / Safari:
image

Chromium:
image

Does the problem go away in Chrome when using GoJS v2.3.7?

I discovered the solution to the issue today. Adjusting the CSS (diagram div) settings to letter-spacing: normal; successfully resolved the problem.