Add and implement expand/collapse arrow buttons in the graph to hide upstream branches
The icon for a node, when that icon is hovered, shall change to an expand/collapse arrow (). Secondary inputs also have that arrow, aligned underneath the location of the node's icon, in the location where the text is—which will slide rightward or be covered over—to accommodate the expand/collapse arrow button.
For nodes, the buttons, which appear when they're hovered over, go here:
For layers, the arrow goes on the layer node icon:
When a layer's side input is collapsed, the input thumbnail remains and the layer retracts to encompass only as far as that thumbnail, but all upstream nodes disappear:
When a node's primary input is collapsed, the input thumbnail remains and the layer retracts to encompass only as far as that thumbnail, but the remaining nodes disappear:
When a layer's secondary input is collapsed, the horizontal part of the wire is kept but fades out rather than curving downwards to the nodes/layers that it previously led to:
The collapsed icon remains visible when it's collapsed (not only while hovered).
Via the context menu when right-clicking a node, we also will have two other ways to collapse nodes:
- Collapse all secondary inputs and fold them up within the single-row node
- Collapse the text name for the node, reducing its width