Yes, I’m using Placeholder
const getUnitDataTooltip = () => {
return $(
go.Adornment,
go.Panel.Position,
{
background: transparentFillColor,
isShadowed: true,
shadowOffset: new go.Point(0,2),
shadowColor: 'rgba(0, 0, 0, 0.06)',
shadowBlur: 6,
},
goMake(
go.Placeholder,
{
background: transparentFillColor,
isActionable: true, // needed because this is in a temporary Layer
}
),
$(
go.Panel,
go.Panel.Position,
{
desiredSize: new go.Size(112, 108),
},
$(
go.Shape,
goObjectTypes.TriangleUp,
{
position: new go.Point(50, 21),
width: 10,
height: 8,
fill: "white",
strokeWidth: 1,
stroke: "#F1F2F3",
},
),
$(
go.Shape,
goObjectTypes.Rectangle,
{
position: new go.Point(1, 28),
strokeWidth: 1,
fill: "white",
stroke: "#F1F2F3",
desiredSize: new go.Size(110, 80),
}
),
$(
go.TextBlock,
{
position: new go.Point(1, 28),
},
new go.Binding('text', '', (data) => {
if(!data.unitBacklogItems) {
return "loading";
} else {
return `${data.unitBacklogItemsCount} Related items`;
}
})
),
),
);
}
here is how positionToolTip looks like
diagram.toolManager.positionToolTip = (tooltip, obj) => {
const nodePos = obj.part.position.copy();
const areaBounds = obj.actualBounds;
const pos = areaBounds.position.copy();
tooltip.position = new go.Point((nodePos.x + pos.x) - (areaBounds.width / 2), nodePos.y + pos.y);
go.ToolManager.prototype.positionToolTip.call(diagram.toolManager, tooltip, obj);
}