Skip to content

Commit

Permalink
Only add resize radius for interactable areas
Browse files Browse the repository at this point in the history
Fixes emilk#576
  • Loading branch information
mankinskin committed Jul 27, 2021
1 parent 691fbe1 commit 57e5f8b
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 57e5f8b

Please sign in to comment.