This is the D3.v4 version of Peter Kerpedjiev's D3 Selectable Force-Directed Graph, allowing one to drag multiple nodes in a force-directed graph. Nodes can be selected by holding the shift key and either dragging on the canvas or clicking on specific nodes. Two modes are defined: Zoom or Brush. Brush mode becomes active if your keyboard's meta key is down (i.e., Alt in Windows and Command in Mac). The following events are available
- Meta key dragging on the canvas toggles the selection status of the nodes enclosed within it.
- In Brush mode clicking on the canvas de-selects everything.
- Key d deselects all selected nodes.