-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing mouse events + resize handler #27
Comments
UPDATE: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Chat link: https://discord.com/channels/797429007683158046/797429007683158051/880072431195258901
cork — Today at 2:53 PM
@MartinKavik How can we attach to the following events?
MZ native drag events haven't been implemented yet (I've created this issue to remember to add them). However you should be able to use the Dominator ones directly:
See Dominator's docs for more info: https://docs.rs/dominator/0.5.19/dominator/events/index.html
Unfortunately, I don't see
WheelEvent
(https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event) in Dominator. However I've already added one custom event to MZ - see https://github.com/MoonZoon/MoonZoon/blob/main/crates/zoon/src/events_extra.rs. So with a bit of luck we just need to add one line likemake_mouse_event!(Wheel, "wheel");
. Feel free to crate a PR once it works for you.window
resize: you can try the code below (NOTE:global_events
has been implemented in a working branch - https://github.com/MartinKavik/MoonZoon/blob/4f315ed02b8286858445b94db6e764bc60cb451e/crates/zoon/src/element/raw_el.rs#L97-L100):parent element resize: Handler is already implemented in the same working branch, see:
orientation change: I'll need to do some research before designing API because I don't have too much experience with it and it's a bit experimental (if I'm reading the correct docs): https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Managing_screen_orientation. However I don't have a problem with merging a PR with a new event in
events_extra.rs
.The text was updated successfully, but these errors were encountered: