mesa
mesa copied to clipboard
Tooltip showing only for highest `Layer`
I noticed that the tooltip only displays for agents on the highest "Layer" in the portrayal when using mesa.visualization.CanvasGrid and mesa.visualization.ModularServer. Is there a way to enable tooltips for agents on other layers as well?
Unfortunately, there is no straightforward fix for this. The lookup table used for the mousemove event is overwritten whenever there a layer is drawn. See https://github.com/projectmesa/mesa/blob/3664aa25c29e71fdb2b8486df5821324e46d4338/mesa/visualization/templates/js/GridDraw.js#L76.