Skip to content

Commit

Permalink
fix: node dragging (#9)
Browse files Browse the repository at this point in the history
Fixes issue #7
  • Loading branch information
Theo Paris authored May 29, 2024
1 parent 0a8aa1a commit b3128f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ impl Context {
}
node.outline_shape.replace(outline_shape);
node.rect = response.response.rect.expand2(node.layout_style.padding);
if response.response.hovered() {
if response.response.hovered() || ui.rect_contains_pointer(node.rect) {
self.node_indices_overlapping_with_mouse.push(idx);
}
}
Expand Down

0 comments on commit b3128f0

Please sign in to comment.