Remix.run Logo
susam 3 days ago

Adding mouseover text to every prime number slows down rendering on large grids (say, with a million or more numbers). So mouseover text is available as an optional feature. You can toggle it using the 't' button at the top: click once to enable the text, and click again to disable it.

Tepix 3 days ago | parent [-]

Thanks, that was fast!

Here's an idea on how to implement it without the slowdown: https://jsfiddle.net/qpswztj8/

Given that it's a preformatted text with a known number of columns, the number below the mouse pointer can be computed using the mouse position, character width and line height.