Skip to content

Default Node Overwrite

Replace the look of the built-in 'default' node type and keep the rest: the NodeTemplate draws every default node as a card with an accent bar, and hands input and output nodes back to BlowDefaultNode so they keep their built-in look.

Input
Custom default A
Custom default B
Output
bit Blow

Try it

  • Compare Custom default A and B with Input and Output: the two default nodes are drawn by the template, as cards with an accent bar; the other two keep the built-in look.
  • Untick overwrite the default node: the cards go back to the built-in default node. Tick it again to bring them back.
  • Drag, connect and select as usual: a template changes how a node looks, not how it behaves.

How it works

  • NodeTemplate renders the content of every node. Its node.Type == "default" branch draws the card, and <BlowDefaultNode Node="node" /> draws every other type exactly as the canvas would without a template.
  • A node whose Type is not set is a "default" node, so the two nodes with no type get the card.
  • The template places its own BlowHandles and passes them node.TargetPosition and node.SourcePosition (Top and Bottom unless a node says otherwise), as the built-in renderer does.
  • The template renders inside the node element, so the card keeps the node's border, padding and selection ring; a rule on .bit-blow-node-default would restyle that frame too.
  • The checkbox is read inside the template: changing it re-renders this page, and with it every node.
An unhandled error has occurred. Reload 🗙