Simon Hunt

GUI - Tweaked link-exit animation.

Change-Id: Ic0604c2492feef657665147202e5f346579a4a53
...@@ -70,8 +70,11 @@ ...@@ -70,8 +70,11 @@
70 } 70 }
71 }, 71 },
72 topo: { 72 topo: {
73 + linkBaseColor: '#666',
73 linkInColor: '#66f', 74 linkInColor: '#66f',
74 - linkInWidth: 14 75 + linkInWidth: 14,
76 + linkOutColor: '#f00',
77 + linkOutWidth: 30
75 }, 78 },
76 icons: { 79 icons: {
77 w: 28, 80 w: 28,
...@@ -529,7 +532,7 @@ ...@@ -529,7 +532,7 @@
529 el.transition() 532 el.transition()
530 .duration(1000) 533 .duration(1000)
531 .attr('stroke-width', linkScale(lw)) 534 .attr('stroke-width', linkScale(lw))
532 - .attr('stroke', '#666'); // TODO: remove explicit stroke (use CSS) 535 + .attr('stroke', config.topo.linkBaseColor);
533 } 536 }
534 537
535 // ============================== 538 // ==============================
...@@ -1011,17 +1014,15 @@ ...@@ -1011,17 +1014,15 @@
1011 1014
1012 // operate on exiting links: 1015 // operate on exiting links:
1013 link.exit() 1016 link.exit()
1014 - .attr({ 1017 + .attr('stroke-dasharray', '3, 3')
1015 - 'stroke-dasharray': '3, 3' 1018 + .style('opacity', 0.5)
1016 - })
1017 - .style('opacity', 0.4)
1018 .transition() 1019 .transition()
1019 .duration(1500) 1020 .duration(1500)
1020 .attr({ 1021 .attr({
1021 - 'stroke-dasharray': '3, 12' 1022 + 'stroke-dasharray': '3, 12',
1023 + stroke: config.topo.linkOutColor,
1024 + 'stroke-width': config.topo.linkOutWidth
1022 }) 1025 })
1023 - .transition()
1024 - .duration(500)
1025 .style('opacity', 0.0) 1026 .style('opacity', 0.0)
1026 .remove(); 1027 .remove();
1027 } 1028 }
......