mouse wheel prevent default, commands for miller columns
This commit is contained in:
parent
4807b1bde5
commit
50238c1577
2 changed files with 54 additions and 8 deletions
|
@ -89,8 +89,9 @@ impl PixiCanvas {
|
|||
}))
|
||||
.update_raw_el(|raw_el| {
|
||||
// @TODO rewrite to a native Zoon API
|
||||
raw_el.event_handler(
|
||||
raw_el.event_handler_with_options(EventOptions::new().preventable(),
|
||||
clone!((controller) move |event: events_extra::WheelEvent| {
|
||||
event.prevent_default();
|
||||
if let Some(controller) = controller.lock_ref().as_ref() {
|
||||
controller.zoom_or_pan(
|
||||
event.delta_y(),
|
||||
|
|
Reference in a new issue