Move Unselected Nodes Demo
This demo shows a special input mode that allows you to move nodes without selecting them
first.
This is done by enabling the GraphEditorInputMode#moveUnselectedInputMode.
Things to Try
-
Move a node around by dragging the top without selecting the node first. Note that the
cursor indicates that the node can be moved.
- Try the different modes provided by the Move Unselected Nodes combo box.
-
Try setting the Edge Creation Mode to At Port Candidates and see how
it works in conjunction with moving unselected nodes.
-
Disable Move Selected Nodes which is the out of the box
MoveInputMode to move selected nodes. When disabled, only the current
Move Unselected Nodes setting is considered, therefore selected nodes may not
be draggable.
Note that both, the standard and the special move input mode, can be enabled at the same
time.
Move Unselected Settings
The Move Unselected Nodes combo box provides different modes which determine
whether a node can be moved.
- Always
-
Nodes can always be moved by dragging them without selecting them first. This is the
standard behavior of the special move input mode.
- Shift Not Pressed
-
Nodes cannot be moved if the Shift key is held down while dragging. Instead, this
gesture may start edge creation if the Edge Creation Mode is set to default.
- Top of Node
-
Nodes can only be moved when dragged at their top. Note how the cursor changes when you
hover over different areas of the node.
- If Move Enabled
- Nodes can only be moved if the Move Enabled button is activated.
- Never
- Unselected nodes cannot be moved.
Edge Creation Settings
The Edge Creation Mode combo box provides different behaviors for the edge
creation gesture.
- Default
-
The default edge creation behavior. When this is set, users may not be able to create
edges because the node may be moved instead.
- At Port Candidates
-
This allows edge creation to start at distinct port candidates which also works in
conjunction with moving unselected nodes.