Usage of tooltips like Tooltipster

Tags: #<Tag:0x00007f4532a23310>

For displaying of PDF-Previews and other stuff I need a way to add such UI elements.
How can I hook the mouseover event?

Hi @Knoeterich

I would use the afterOnCellMouseOver hook to open a window.

Do you already have the PDF-preview part done? If so you can pack that preview in a window and for example use the event.getBoundingClientRect() method to get a proper position to set up the window on/next to the origin cell.

Thanks for your quick answer. I have used this code:

hot.addHook('afterOnCellMouseOut', (event, coords, td) => {
      if (hot.propToCol('anschrift1') == coords.col) {
            $(td).tooltipster({
               content: $('<img src="https://www.jenaconvention.de/app/uploads/2019/10/convention-jena-panorama_AGra%CC%88f_klein-1920x640.jpg" width="900" />')
            });
      }
});
1 Like