Merge pull request #1998 from malramsay64/image_viewer_scroll
fix: Check cursor in bounds when scrolling image::Viewer
This commit is contained in:
commit
cb8b70bec3
2 changed files with 3 additions and 1 deletions
|
|
@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `BorderRadius` not exposed in root crate. [#1972](https://github.com/iced-rs/iced/pull/1972)
|
||||
- Outdated `ROADMAP`. [#1958](https://github.com/iced-rs/iced/pull/1958)
|
||||
- `iced_wgpu` freezing on empty layers. [#1996](https://github.com/iced-rs/iced/pull/1996)
|
||||
- `image::Viewer` reacting to any scroll event. [#1998](https://github.com/iced-rs/iced/pull/1998)
|
||||
|
||||
Many thanks to...
|
||||
|
||||
|
|
@ -99,6 +100,7 @@ Many thanks to...
|
|||
- @JonathanLindsey
|
||||
- @kr105
|
||||
- @marienz
|
||||
- @malramsay64
|
||||
- @nicksenger
|
||||
- @nicoburns
|
||||
- @Redhawk18
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ where
|
|||
|
||||
match event {
|
||||
Event::Mouse(mouse::Event::WheelScrolled { delta }) => {
|
||||
let Some(cursor_position) = cursor.position() else {
|
||||
let Some(cursor_position) = cursor.position_over(bounds) else {
|
||||
return event::Status::Ignored;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue