fix: allow overlay mouse interaction outside its bounds
This commit is contained in:
parent
aa2a50110d
commit
a01beefa84
2 changed files with 1 additions and 15 deletions
|
|
@ -271,13 +271,8 @@ where
|
||||||
let mut layouts = layout.children();
|
let mut layouts = layout.children();
|
||||||
|
|
||||||
let layout = layouts.next()?;
|
let layout = layouts.next()?;
|
||||||
let cursor_position = cursor.position()?;
|
|
||||||
let overlay = element.as_overlay_mut();
|
let overlay = element.as_overlay_mut();
|
||||||
|
|
||||||
if !overlay.is_over(layout, renderer, cursor_position) {
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
|
|
||||||
Some(
|
Some(
|
||||||
overlay
|
overlay
|
||||||
.overlay(layout, renderer)
|
.overlay(layout, renderer)
|
||||||
|
|
|
||||||
|
|
@ -537,16 +537,7 @@ where
|
||||||
cursor,
|
cursor,
|
||||||
);
|
);
|
||||||
|
|
||||||
if cursor
|
if overlay_interaction != mouse::Interaction::default()
|
||||||
.position()
|
|
||||||
.map(|cursor_position| {
|
|
||||||
overlay.is_over(
|
|
||||||
Layout::new(layout),
|
|
||||||
renderer,
|
|
||||||
cursor_position,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.unwrap_or_default()
|
|
||||||
{
|
{
|
||||||
overlay_interaction
|
overlay_interaction
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue