How to pined a node to another node?

hi walter ,i want to pined node A to node B, how to do it ? when dragging node B ,node A should be followed.

If node B is a Group and if node A is a member of node B, then moving B will automatically move A. (Also, node A is copied when node B is copied, and node A is deleted when node B is deleted.) See samples such as Regrouping Demo.

If there is a Link from node B to node A (even if it is not seen), and if DraggingTool.dragsTree is true, then dragging node B will automatically drag node A (both move and copy). See samples such as Incremental Tree.

More generally, you can override DraggingTool.computeEffectiveCollection to make arbitrary or dynamic decisions regarding what other Parts should be dragged besides the Diagram.selection. See samples such as Pipes or Seating Chart.