fix: regression caused by #652

This commit is contained in:
Jake Stanger 2024-11-10 17:35:37 +00:00
parent ed338e948c
commit 05530cf776
No known key found for this signature in database
GPG Key ID: C51FC8F9CB0BEA61

View File

@ -246,6 +246,13 @@ impl CommonConfig {
let script = match event.direction() {
ScrollDirection::Up => scroll_up_script.as_ref(),
ScrollDirection::Down => scroll_down_script.as_ref(),
ScrollDirection::Smooth => {
if event.scroll_deltas().unwrap_or_default().1 > 0.0 {
scroll_down_script.as_ref()
} else {
scroll_up_script.as_ref()
}
}
_ => None,
};