capdag 0.188.482 → 0.190.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cap-fab-renderer.js +20 -12
- package/package.json +1 -1
package/cap-fab-renderer.js
CHANGED
|
@@ -382,9 +382,11 @@ function layoutForMode(mode) {
|
|
|
382
382
|
'elk.layered.spacing.nodeNodeBetweenLayers': 220,
|
|
383
383
|
'elk.layered.spacing.edgeEdgeBetweenLayers': 44,
|
|
384
384
|
'elk.layered.spacing.edgeNodeBetweenLayers': 52,
|
|
385
|
+
'elk.layered.spacing.baseValue': 40,
|
|
386
|
+
'elk.layered.nodePlacement.favorStraightEdges': true,
|
|
385
387
|
'elk.spacing.edgeEdge': 34,
|
|
386
388
|
'elk.spacing.edgeNode': 42,
|
|
387
|
-
'elk.spacing.nodeNode':
|
|
389
|
+
'elk.spacing.nodeNode': 168,
|
|
388
390
|
});
|
|
389
391
|
}
|
|
390
392
|
if (mode === 'strand') {
|
|
@@ -540,10 +542,8 @@ function buildStylesheet() {
|
|
|
540
542
|
// text no longer reads as floating metadata.
|
|
541
543
|
'text-rotation': 'autorotate',
|
|
542
544
|
'text-margin-y': -6,
|
|
543
|
-
'curve-style': '
|
|
544
|
-
'control-point-step-size':
|
|
545
|
-
'control-point-distances': 'data(controlPointDistances)',
|
|
546
|
-
'control-point-weights': 'data(controlPointWeights)',
|
|
545
|
+
'curve-style': 'bezier',
|
|
546
|
+
'control-point-step-size': 40,
|
|
547
547
|
'width': 1.5,
|
|
548
548
|
'line-color': 'data(color)',
|
|
549
549
|
'target-arrow-color': 'data(color)',
|
|
@@ -553,6 +553,15 @@ function buildStylesheet() {
|
|
|
553
553
|
'transition-duration': '0.2s',
|
|
554
554
|
},
|
|
555
555
|
},
|
|
556
|
+
{
|
|
557
|
+
selector: 'edge.crowded-edge',
|
|
558
|
+
style: {
|
|
559
|
+
'curve-style': 'unbundled-bezier',
|
|
560
|
+
'control-point-step-size': 'data(controlPointStepSize)',
|
|
561
|
+
'control-point-distances': 'data(controlPointDistances)',
|
|
562
|
+
'control-point-weights': 'data(controlPointWeights)',
|
|
563
|
+
},
|
|
564
|
+
},
|
|
556
565
|
{
|
|
557
566
|
selector: 'edge.highlighted',
|
|
558
567
|
style: { 'width': 2.5, 'z-index': 999 },
|
|
@@ -1033,15 +1042,14 @@ function annotateCrowdedBrowseEdges(edges) {
|
|
|
1033
1042
|
const crowdCount = Math.max(sourceCount, targetCount);
|
|
1034
1043
|
|
|
1035
1044
|
if (crowdCount <= 2) {
|
|
1036
|
-
edge.
|
|
1037
|
-
edge.controlPointStepSize = 40;
|
|
1045
|
+
edge.crowdedClass = '';
|
|
1038
1046
|
continue;
|
|
1039
1047
|
}
|
|
1040
1048
|
|
|
1041
1049
|
const sourceOffset = crowdOffsets(sourceIndex.get(edge.id), sourceCount, 18, 64);
|
|
1042
1050
|
const targetOffset = crowdOffsets(targetIndex.get(edge.id), targetCount, 18, 64);
|
|
1043
1051
|
|
|
1044
|
-
edge.
|
|
1052
|
+
edge.crowdedClass = 'crowded-edge';
|
|
1045
1053
|
edge.controlPointDistances = `${sourceOffset} ${targetOffset}`;
|
|
1046
1054
|
edge.controlPointWeights = '0.22 0.78';
|
|
1047
1055
|
edge.controlPointStepSize = 56;
|
|
@@ -1149,11 +1157,11 @@ function browseCytoscapeElements(built) {
|
|
|
1149
1157
|
fullUrn: edge.capability.urn,
|
|
1150
1158
|
capFabEdgeIndex: edge.capFabEdgeIndex,
|
|
1151
1159
|
color: edge.color,
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
controlPointWeights: edge.controlPointWeights || '',
|
|
1160
|
+
controlPointStepSize: edge.controlPointStepSize || 56,
|
|
1161
|
+
controlPointDistances: edge.controlPointDistances || '0 0',
|
|
1162
|
+
controlPointWeights: edge.controlPointWeights || '0.22 0.78',
|
|
1156
1163
|
},
|
|
1164
|
+
classes: edge.crowdedClass || '',
|
|
1157
1165
|
};
|
|
1158
1166
|
});
|
|
1159
1167
|
return nodeElements.concat(edgeElements);
|
package/package.json
CHANGED