Replies: 1 comment 1 reply
-
There's nothing built into the framework that touches on this. As you note you can do it with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
For plot interaction I need to call event.prevent_default() on the wheel event.
I just created a callback and connected it to the component with on:wheel.
Now the browser does not care about the prevent default, because the event is declared as passive.
Is there a way to declare the event as passive = false? The only thing I found is the following in web_sys:
HtmlElement::add_event_listener_with_callback_and_add_event_listener_options("wheel", <js_sys::Function>, AddEventListenerOptions::passive(false))
But there I don't know how to add my callback as js_sys::Function. Is there a different way of achieving this?
Thank you :)
I'm planning on open sourcing the plotter as a leptos component as soon as the basics are done!
Beta Was this translation helpful? Give feedback.
All reactions