ui.interactive_image svg event svg:pointerenter and svg:pointerleave don't receive the element id #4331
sdegrace
started this conversation in
Ideas / Feature Requests
Replies: 2 comments
-
Thanks for reporting this issue, @sdegrace! I had to give the interactive image some width in order to see it: ui.interactive_image(content='<circle id="X" cx="50" cy="50" r="25" pointer-events="all" />', size=(100, 100)) \
.classes('w-80 border') \
.on('svg:pointerenter', lambda e: print(e.args['type'], e.args['element_id'])) \
.on('svg:pointerleave', lambda e: print(e.args['type'], e.args['element_id'])) \
.on('svg:pointerdown', lambda e: print(e.args['type'], e.args['element_id'])) The problem is that the "target" attribute of the pointerenter and pointerleave events contain the SVG, not the circle. This seems to be a JavaScript limitation and I'm not sure what to do about it. Does anyone have an idea? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll convert this issue into a feature request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
This triggers an event for each pointerenter and pointerleave and the pointerdown events, but only pointerdown has an element_id. pointerenter and pointerleave both give the following event args:
whereas the pointerdown triggers:
Beta Was this translation helpful? Give feedback.
All reactions