Skip to content

Commit

Permalink
fix SecondHalfGames#149 related issue with hit test
Browse files Browse the repository at this point in the history
  • Loading branch information
msparkles committed Apr 17, 2024
1 parent 6ef5e05 commit b7bd038
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/yakui-core/src/input/input_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,7 @@ fn hit_test(_dom: &Dom, layout: &LayoutDom, coords: Vec2, output: &mut Vec<Widge
continue;
};

let mut rect = layout_node.rect;
let mut node = layout_node;
while let Some(parent) = node.clipped_by {
node = layout.get(parent).unwrap();
rect = rect.constrain(node.rect);
}
let rect = layout_node.rect;

if rect.contains_point(coords) {
output.push(id);
Expand Down

0 comments on commit b7bd038

Please sign in to comment.