capdag 0.188.482 → 0.189.485

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.
Files changed (2) hide show
  1. package/cap-fab-renderer.js +17 -11
  2. package/package.json +1 -1
@@ -540,10 +540,8 @@ function buildStylesheet() {
540
540
  // text no longer reads as floating metadata.
541
541
  'text-rotation': 'autorotate',
542
542
  'text-margin-y': -6,
543
- 'curve-style': 'data(curveStyle)',
544
- 'control-point-step-size': 'data(controlPointStepSize)',
545
- 'control-point-distances': 'data(controlPointDistances)',
546
- 'control-point-weights': 'data(controlPointWeights)',
543
+ 'curve-style': 'bezier',
544
+ 'control-point-step-size': 40,
547
545
  'width': 1.5,
548
546
  'line-color': 'data(color)',
549
547
  'target-arrow-color': 'data(color)',
@@ -553,6 +551,15 @@ function buildStylesheet() {
553
551
  'transition-duration': '0.2s',
554
552
  },
555
553
  },
554
+ {
555
+ selector: 'edge.crowded-edge',
556
+ style: {
557
+ 'curve-style': 'unbundled-bezier',
558
+ 'control-point-step-size': 'data(controlPointStepSize)',
559
+ 'control-point-distances': 'data(controlPointDistances)',
560
+ 'control-point-weights': 'data(controlPointWeights)',
561
+ },
562
+ },
556
563
  {
557
564
  selector: 'edge.highlighted',
558
565
  style: { 'width': 2.5, 'z-index': 999 },
@@ -1033,15 +1040,14 @@ function annotateCrowdedBrowseEdges(edges) {
1033
1040
  const crowdCount = Math.max(sourceCount, targetCount);
1034
1041
 
1035
1042
  if (crowdCount <= 2) {
1036
- edge.curveStyle = 'bezier';
1037
- edge.controlPointStepSize = 40;
1043
+ edge.crowdedClass = '';
1038
1044
  continue;
1039
1045
  }
1040
1046
 
1041
1047
  const sourceOffset = crowdOffsets(sourceIndex.get(edge.id), sourceCount, 18, 64);
1042
1048
  const targetOffset = crowdOffsets(targetIndex.get(edge.id), targetCount, 18, 64);
1043
1049
 
1044
- edge.curveStyle = 'unbundled-bezier';
1050
+ edge.crowdedClass = 'crowded-edge';
1045
1051
  edge.controlPointDistances = `${sourceOffset} ${targetOffset}`;
1046
1052
  edge.controlPointWeights = '0.22 0.78';
1047
1053
  edge.controlPointStepSize = 56;
@@ -1149,11 +1155,11 @@ function browseCytoscapeElements(built) {
1149
1155
  fullUrn: edge.capability.urn,
1150
1156
  capFabEdgeIndex: edge.capFabEdgeIndex,
1151
1157
  color: edge.color,
1152
- curveStyle: edge.curveStyle || 'bezier',
1153
- controlPointStepSize: edge.controlPointStepSize || 40,
1154
- controlPointDistances: edge.controlPointDistances || '',
1155
- controlPointWeights: edge.controlPointWeights || '',
1158
+ controlPointStepSize: edge.controlPointStepSize || 56,
1159
+ controlPointDistances: edge.controlPointDistances || '0 0',
1160
+ controlPointWeights: edge.controlPointWeights || '0.22 0.78',
1156
1161
  },
1162
+ classes: edge.crowdedClass || '',
1157
1163
  };
1158
1164
  });
1159
1165
  return nodeElements.concat(edgeElements);
package/package.json CHANGED
@@ -40,5 +40,5 @@
40
40
  "pretest": "npm run build:parser",
41
41
  "test": "node capdag.test.js"
42
42
  },
43
- "version": "0.188.482"
43
+ "version": "0.189.485"
44
44
  }