Skip to content

Instantly share code, notes, and snippets.

View YuriGor's full-sized avatar
🍒
Making perfect, remember to finish.

Yuri Gor YuriGor

🍒
Making perfect, remember to finish.
View GitHub Profile
@YuriGor
YuriGor / dg-jsplumb.js
Last active September 3, 2016 21:37 — forked from michiel/dg-jsplumb.js
// based on http://onais-m.blogspot.nl/2014/10/automatic-graph-layout-with-javascript.html
var jsp = jsPlumb.getInstance();
// construct dagre graph from JsPlumb graph
/* global dagre */
var g = new dagre.graphlib.Graph();
g.setGraph({nodesep:30,ranksep:30,marginx:50,marginy:50});
g.setDefaultEdgeLabel(function() { return {}; });
$('.xnode').each(