Skip to content

Instantly share code, notes, and snippets.

View ngminhtrung's full-sized avatar

Trung Nguyen ngminhtrung

View GitHub Profile
@ngminhtrung
ngminhtrung / LICENSE
Created May 31, 2018 06:59 — forked from rkirsling/LICENSE
Directed Graph Editor
Copyright (c) 2013-2018 Ross Kirsling
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@ngminhtrung
ngminhtrung / .block
Created May 24, 2018 01:39 — forked from john-guerra/.block
Force in a Box algorithm
license: mit
@ngminhtrung
ngminhtrung / .block
Created May 23, 2018 08:00 — forked from Fil/.block
Brush Handles d3v4 II
license: gpl-3.0
@ngminhtrung
ngminhtrung / .block
Created May 23, 2018 07:51 — forked from mbostock/.block
Brush & Zoom II
license: gpl-3.0
height: 600
@ngminhtrung
ngminhtrung / README.md
Last active May 24, 2018 07:20 — forked from pkerpedjiev/ SelectableForceDirectedGraph
D3 Selectable Force-Directed Graph

Forked from https://gist.github.com/pkerpedjiev/0389e39fad95e1cf29ce

This is an extension of Mike Bostock's Draggable Network II example, 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. The selection and dragging semantics aim to mirror those of most window managers:

  1. Shift clicking on a node toggles whether it is selected
  2. Clicking (without shift) on a node, selects it and deselects everything else.
  3. Shift dragging on the canvas toggles the selection status of the nodes enclosed within it.
  4. Dragging a set of selected nodes drags all of them.
  5. Clicking on the canvas de-selects everything.
@ngminhtrung
ngminhtrung / .block
Last active May 10, 2018 08:18 — forked from steveharoz/.block
d3-force testing ground
license: gpl-3.0
height: 1030
scrolling: yes