Skip to content

Commit

Permalink
Only add resize radius for interactable areas
Browse files Browse the repository at this point in the history
Fixes #576
  • Loading branch information
mankinskin committed Jul 23, 2021
1 parent 52d187a commit 5cef4ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions egui/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,13 @@ impl Areas {
for layer in self.order.iter().rev() {
if self.is_visible(layer) {
if let Some(state) = self.areas.get(&layer.id) {
let mut rect = Rect::from_min_size(state.pos, state.size);
if state.interactable {
let rect = Rect::from_min_size(state.pos, state.size);
// Allow us to resize by dragging just outside the window:
let rect = rect.expand(resize_interact_radius_side);
if rect.contains(pos) {
return Some(*layer);
}
rect = rect.expand(resize_interact_radius_side);
}
if rect.contains(pos) {
return Some(*layer);
}
}
}
Expand Down

0 comments on commit 5cef4ff

Please sign in to comment.