Skip to content

Instantly share code, notes, and snippets.

@pepgma
pepgma / README.md
Last active August 3, 2019 13:59 — forked from lgersman/README.md
My mod: support d3.v4 (Tested on 4.9.1). Original text: improved version of my d3.js selection frame example (https://gist.github.com/lgersman/5310854) supporting draggable/selectable nodes
  • Click into the drawing area to start the selection frame
  • move the mouse to resize the selection frame
  • Release the mouse button to resize the selection frame

new features :

  • circles are draggable
  • circles can be selected (multiple selections possible by pressing CTRL while clicking a circle)
  • the selection frame selects all circles within the frame (by pressing CTRL the selected circles will be appended to current selection)
  • multiple selected circles will be dragged simultaneous