Add tests for more parameter type variants

This commit is contained in:
Peter Kimberley
2019-02-04 21:14:59 +11:00
parent 5801c73d2c
commit 9905bc0e2e
+25 -1
View File
@@ -12,25 +12,49 @@ graph
.height(100)
.backgroundColor('#FFF')
.nodeRelSize(4)
.nodeVal(1)
.nodeVal('val')
.nodeVal((node) => node.val)
.nodeLabel('name')
.nodeLabel((node) => node.name)
.nodeColor('color')
.nodeColor((node) => node.val)
.nodeAutoColorBy('color')
.nodeAutoColorBy((node) => node.val)
.nodeCanvasObject((node, ctx, scale) => {})
.linkLabel('name')
.linkLabel((link) => link.type)
.linkVisibility(true)
.linkVisibility((link) => true)
.linkColor('color')
.linkColor((link) => link.type)
.linkAutoColorBy('type')
.linkAutoColorBy((link) => link.type)
.linkWidth(1)
.linkWidth((link) => 1)
.linkCurvature(ForceGraph.LinkCurvatureType.Straight)
.linkCurvature('curvature')
.linkCurvature((link) => ForceGraph.LinkCurvatureType.Straight)
.linkCanvasObject((link, ctx, scale) => {})
.linkDirectionalArrowLength(0)
.linkDirectionalArrowLength('length')
.linkDirectionalArrowLength((link) => 0)
.linkDirectionalArrowColor('color')
.linkDirectionalArrowColor((link) => link.type)
.linkDirectionalArrowRelPos(0.5)
.linkDirectionalArrowRelPos('pos')
.linkDirectionalArrowRelPos((link) => 0.5)
.linkDirectionalParticles(0)
.linkDirectionalParticles('particles')
.linkDirectionalParticles((link) => 0)
.linkDirectionalParticleSpeed(0.01)
.linkDirectionalParticleSpeed('speed')
.linkDirectionalParticleSpeed((link) => 0.01)
.linkDirectionalParticleWidth(4)
.linkDirectionalParticleColor('color');
.linkDirectionalParticleWidth('width')
.linkDirectionalParticleWidth((link) => 4)
.linkDirectionalParticleColor('color')
.linkDirectionalParticleColor((link) => link.type);
graph.pauseAnimation();
graph.resumeAnimation();