File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 55 < meta charset ="utf-8 " />
66 < title > git commit dependency graph</ title >
77
8- < script language ="javascript " type ="text/javascript " src ="node_modules/webcola/WebCola/cola.min.js "> </ script >
98 < script language ="javascript " type ="text/javascript " src ="js/bundle.js "> </ script >
109
1110 < link rel ="stylesheet " type ="text/css " href ="css/animate.css " />
Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ d3 = require "d3"
44d3tip = require " d3-tip"
55d3tip d3
66
7+ # Hacky workaround:
8+ # https://github.com/tgdwyer/WebCola/issues/145#issuecomment-271316856
9+ window .d3 = d3
10+
11+ cola = require " webcola"
12+
713global .gdn = require " ./git-deps-noty.coffee"
814global .gdd = require " ./git-deps-data.coffee"
915global .gdl = require " ./git-deps-layout.coffee"
@@ -548,17 +554,16 @@ tick_handler = ->
548554
549555 paths .attr " d" , (d ) ->
550556 # Undocumented: https://github.com/tgdwyer/WebCola/issues/52
551- cola .vpsc .makeEdgeBetween \
552- d,
557+ route = cola .makeEdgeBetween \
553558 d .source .innerBounds ,
554559 d .target .innerBounds ,
555560 # This value is related to but not equal to the
556561 # distance of arrow tip from object it points at:
557562 5
558563
559564 lineData = [
560- {x : d .sourceIntersection .x , y : d .sourceIntersection .y },
561- {x : d .arrowStart .x , y : d .arrowStart .y }
565+ {x : route .sourceIntersection .x , y : route .sourceIntersection .y },
566+ {x : route .arrowStart .x , y : route .arrowStart .y }
562567 ]
563568 return lineFunction lineData
564569
Original file line number Diff line number Diff line change 2727 "dependencies" : {
2828 "d3-tip" : " ~0.6.6" ,
2929 "d3" : " ~3.5.3" ,
30- "webcola" : " aspiers/WebCola#fix-commonjs " ,
30+ "webcola" : " aspiers/WebCola#git-deps-master " ,
3131 "jquery" : " ~2.1.3" ,
3232 "noty" : " needim/noty" ,
3333 "browserify" : " *" ,
You can’t perform that action at this time.
0 commit comments