mesa icon indicating copy to clipboard operation
mesa copied to clipboard

Tooltip showing only for highest `Layer`

Open chathika opened this issue 3 years ago • 1 comments

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?

chathika avatar Aug 30 '22 18:08 chathika

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.

rht avatar Aug 31 '22 06:08 rht