Skip to content

Get the mouse position when onSelectionChange #5152

Answered by jerch
alanhe421 asked this question in Q&A
Discussion options

You must be logged in to vote

No, thats currently not exposed by the selection logic. It also never got asked before, so this seems to be of limited usage/demand.

What you can do as a workaround - in onSelectionChange grab the end position of the selection and calc the offset yourself based on the text metrics. Thats also more accurate than the mouse position (mouse might be at half the line/char). With the text metrics you can perfectly align your popup to the text cells.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alanhe421
Comment options

Answer selected by alanhe421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants