I am using a HTML tooltip with the following code -
return $(go.HTMLInfo, {
show: (obj) => {
const mousePt = diagram.lastInput.viewPoint;
tooltipDiv.style.left = `${mousePt.x + 10}px`;
tooltipDiv.style.top = `${mousePt.y + 20}px`;
const tooltipContent = getTooltip(obj);
ReactDOM.render(tooltipContent, tooltipDiv);
tooltipDiv.style.display = 'block';
},
hide: () => {
tooltipDiv.style.display = 'none';
},
});
The tooltip seems to be stuck when the node is moved. Please see the following gif. I want to achieve either of the two behaviours here -
- Make tooltip disappear when the node is selected.
- Make tooltip move with the node as the node is repositioned.