Skip to content

Commit

Permalink
Node selection
Browse files Browse the repository at this point in the history
Select multiple nodes by holding down Shift and clicking on the nodes.
Deselect a node by clicking on selected node while holding down Ctrl/Cmd.
Select many nodes at once by dragging a selection box around them using Shift.
If Shift is still down when selection box is released, the new selection will be added to the existing selection.
If Ctrl/Cmd is down when selection box is released, nodes will be deselected instead.
Deselect all nodes by clicking on the background with Ctrl/Cmd down.
If selected node is moved, all selected nodes will move with it.
  • Loading branch information
zakarumych committed Apr 11, 2024
1 parent 2e2e225 commit 4f9bff3
Show file tree
Hide file tree
Showing 8 changed files with 950 additions and 510 deletions.
2 changes: 1 addition & 1 deletion examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl SnarlViewer<DemoNode> for DemoViewer {
match &*pin.remotes {
[] => {
ui.label("None");
PinInfo::circle().with_fill(UNTYPED_COLOR)
PinInfo::star().with_fill(UNTYPED_COLOR)
}
[remote] => match snarl[remote.node] {
DemoNode::Sink => unreachable!("Sink node has no outputs"),
Expand Down
Loading

0 comments on commit 4f9bff3

Please sign in to comment.