Yes, i have thought about this solution. The point is that i want to have the behaviour that Tooltip gives me, so i tried something like this, sorry for this ugly piece of code :blush:
This works more or less, but i want to reposition and style my tooltip according to the mouse position AND the graphObject position.
Is there a way to access this information (=mouse position) without registering an event handler to keeping tracks of mouse position ?
myDiagram.toolManager.showToolTip = function(tooltip, graph) {
console.log(this, tooltip, graph.actualBounds.x, graph.actualBounds.y);
var point = new go.Point( graph.actualBounds.x, graph.actualBounds.y);
var p2 = myDiagram.transformDocToView(point);
console.log(p2.x, p2.y);
// do some magic to determine arrow position
// y position does not need to be corrected
_tooltip.css({top:p2.y+'px',left:(392+p2.x)+'px'});
_tooltip.toggleClass('in');
if (!!graph.data.htmlTooltip) {
} else {
console.log('default behaviour')
go.ToolManager.prototype.showToolTip.call(myDiagram.toolManager, tooltip, graph)
}
// fallback to default behaviour
};