Tooltip position in mxGraph is way off when graph is contained in a div

672 views Asked by At

I'm using the base example of mxGraph which can be found here: graphEditor to start.

In the example above, the tooltips open to the right of the icons from the left sidebar. For example, shapes, lines, etc.

I have my graph contained in a div, smaller area on page... but the tooltips are now floating way off to the left as if this thing is full screen still. I'm not sure of how to share additional details but hoping tagging this with mxGraph those of you who have experience working with this may have run into the same issue.

1

There are 1 answers

0
ksholla20 On

I added following piece of code

graph.tooltipHandler.div.style.position="absolute";

This solved the issue