Reference
Interaction
Reader interaction feeds straight back into the style expressions through view state.
Selecting a node#
- The node is marked
node.selected. - Directly connected nodes become
node.active. - Unrelated nodes become
node.dimmed. - Connected edges become
edge.active. - The detail panel opens.
These flags are just fields in the expression context, so styling reacts automatically:
mantou
style node {
opacity: node.dimmed ? 0.35 : 1
border: node.selected ? chili : node.parent.selected ? scallion : border
}
style edge {
color: edge.active ? chili : bamboo
width: edge.active ? 3 : 1
}🥟
Click around
🥟
Nothing selected
Click a node or edge to inspect it. Connected nodes light up, the rest dim.