Closed bitspittle closed 2 years ago
Note: I fully expect for you to diverge from how I'm doing it, but here's what I'm doing at the moment as a workaround:
Perhaps I don't get the question. Let's figure it out.
Currently there is a way to add listeners that you're asking about: onMouseEnter onMouseLeave onMouseMove
And as I see in your code snippet you're already using them.
So my question is: What kind of mouse events support would you like to have?
My apologies for the lack of clarity, thanks for following up with those questions.
I updated the title, hopefully it's more clear now. I think mouse events should be exposed through the Modifier
class, beyond just clickable
which is available right now.
FWIW, the code I linked to it in a module in my project called compose-ext
which I'm hoping one day to delete entirely. I don't think it should exist - I'm just patching what I think are the current holes in the Web Compose API so I can keep moving.
closing this issue. Reason: since 1.0.0 compose.web.widgets module was deprecated.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
In particular: https://github.com/JetBrains/compose-jb/tree/master/tutorials/Mouse_Events
If for some reason, the API intentionally diverges due to differences in how web and desktop work, that's fine -- but there needs to be a way to support onMouseEnter, onMouseLeave, and onMouseMove at the very least.