Text inside Textblocks get cropped

When the text wrap inside a textblock, it gets cropped, how to avoid that ?

On the screenshots , DATE_NUM_MONTH_IN_YEAR wraps and gets cropped.

In a quick test, I am unable to reproduce the behavior.

How did you define the TextBlock? Does the behavior vary in different browsers?

I am using Chrome,

I am using this template, which go in another template:

            var fieldTemplate =
                _$(go.Panel, "TableRow",  // this Panel is a row in the containing Table
                    {
                        background: "transparent",  // so this port's background can be picked by the mouse
                        fromSpot: go.Spot.Right,  // links only go from the right side to the left side
                        toSpot: go.Spot.Left,
                        // allow drawing links from or to this port:
                        fromLinkable: true, toLinkable: true
                    },
                    _$(go.Picture,
                        { width: 12, height: 12, column: 0, margin: 4,
                            background: "transparent",
                            // but disallow drawing links from or to this shape:
                            fromLinkable: false, toLinkable: false },
                        new go.Binding("source", "source")
                        //new go.Binding("visible", "source", function(v){ return !!v}) USE A TRANSPARENT BCK
                    ),
                    _$(go.TextBlock,
                        { margin: new go.Margin(0, 2), column: 1, font: "bold 13px sans-serif",
                            width:150, wrap: go.TextBlock.None,
                            text: "textAlign: 'right'",
                            // and disallow drawing links from or to this text:
                            fromLinkable: false, toLinkable: false },
                        new go.Binding("text", "name")),
                    _$(go.TextBlock,
                        { margin: new go.Margin(0, 2), column: 2, font: "13px sans-serif",
                            width:100,
                            textAlign: "right"},
                        new go.Binding("text", "info"))
                );

I’ll try to come with a simple, reproductible example.

So you did want it to wrap, unlike the other TextBlock?

Oh…

There are 2 textblocks in my template, one does not wrap ( you do no see in on the screenshots), and the second wraps.

The problem is that the seconde textbox, when it wraps, is a bit ‘cut’ on the left side if you look at the ‘DATE_NUM_MONTH_IN_YEAR’ textbox, you see that the D is not entirely displayed, it looks like it is pushed too far on the left side

I see what happens, it’s just that the text wraps, but the wrap-point is not ‘smart’. I would like to have a way to have some nice-looking wrapping text. I mean that the wrapping should ideally occurs at the end of one caracter, but this would requires some computations.

Ok, i found a solution by using overflowEllipsis, which is way better :smile: