Width of the tooltip for nodes in the palette

Hi,

I have followed the example in http://gojs.net/latest/samples/logicCircuit.html to create a palette and have a tag to set the width of the palette to “100px”. I tried to add the tooltip to each node, however the text block was restrained by the width of the palette and the text can only be partially seen. Is there a way to extend the text block to show the whole text without the constraint of the width of the palette?

Thanks,
Andy

If you want a tooltip that extends beyond the Canvas element where GoJS can draw, you’ll need to use an HTML element rather than an Adornment. Look at the Data Visualization sample for an example of that.

But if you really want to use “native” GoJS tooltips, to prevent tooltips that are too wide for the viewport, try setting a maximum width on the TextBlock in your tooltip. Something like:
maxSize: new go.Size(90, NaN)

Although this prevents the tooltip from being too wide, the tooltip is still being positioned off the left edge of the viewport. You can override ToolManager.positionToolTip to fix that, or you can wait for version 1.2 to come out, where that has already been fixed.

Do you have any sample of code of overriding ToolManager.positionTooltip()?

Thanks.

Are you using version 1.2.1?

No, we are in 1.1.6.

I am suggesting that you try version 1.2, to see if that has better behavior without overriding positionTooltip.