Only show name of element on hover

21 views
Skip to first unread message

Henner Haus

unread,
Jul 22, 2021, 3:36:14 AM7/22/21
to JSXGraph

Is it possible to show the name of an element only if I hover over this one and hide it if not? I didn't came up with a solution after inspecting the JSX.GeometryElement attributes. In my case I need this for points.

Tanks for your thoughts :)

Murray

unread,
Jul 24, 2021, 5:08:45 AM7/24/21
to JSXGraph
Hello Henner

One approach could be to create the point with name = "" (empty text), then change the name to "A" (say) when hovering, then back to "" when the mouse is no longer over the point.

Here's a fiddle demonstrating what I mean: https://jsfiddle.net/mbourne/vnf27uze/

Hope it helps
Murray

Reply all
Reply to author
Forward
0 new messages