Merge remote-tracking branch 'upstream/develop' into neo-new-shapes

* upstream/develop: (27 commits)
  [autofix.ci] apply automated fixes
  fix: Return type, make config non optional
  [autofix.ci] apply automated fixes
  Create red-beans-cross.md
  chore(deps): update dependency eslint-plugin-jsdoc to v50
  remove tsconfig compiler option paths
  linting
  replace mermaid/dist with relative paths
  chore: add git command and set safe dir
  chore: Fix check
  feat: Preview release
  feat: Return parsed config from `mermaid.parse`
  Version Packages
  Adding changeset
  Cleanup of test-file
  Updated cypress test for self-loops
  Fix for issues with self loops
  docs: Fix SMW link
  add blog post - architecture diagrams
  more , linting
  ...
This commit is contained in:
Sidharth Vinod
2024-09-09 18:30:31 +05:30
70 changed files with 5154 additions and 2924 deletions

View File

@@ -224,7 +224,7 @@ export const render = async (
* Add edges to graph based on parsed graph definition
*/
const addEdges = async function (
dataForLayout: { edges: any; direction: string },
dataForLayout: { edges: any; direction?: string },
graph: {
id?: string;
layoutOptions?: {
@@ -764,12 +764,12 @@ export const render = async (
layoutOptions: {
'elk.hierarchyHandling': 'INCLUDE_CHILDREN',
'elk.algorithm': algorithm,
'nodePlacement.strategy': data4Layout.config.elk.nodePlacementStrategy,
'elk.layered.mergeEdges': data4Layout.config.elk.mergeEdges,
'nodePlacement.strategy': data4Layout.config.elk?.nodePlacementStrategy,
'elk.layered.mergeEdges': data4Layout.config.elk?.mergeEdges,
'elk.direction': 'DOWN',
'spacing.baseValue': 35,
'elk.layered.unnecessaryBendpoints': true,
'elk.layered.cycleBreaking.strategy': data4Layout.config.elk.cycleBreakingStrategy,
'elk.layered.cycleBreaking.strategy': data4Layout.config.elk?.cycleBreakingStrategy,
// 'spacing.nodeNode': 20,
// 'spacing.nodeNodeBetweenLayers': 25,
// 'spacing.edgeNode': 20,
@@ -852,8 +852,8 @@ export const render = async (
...node.layoutOptions,
'elk.algorithm': algorithm,
'elk.direction': dir2ElkDirection(node.dir),
'nodePlacement.strategy': data4Layout.config['elk.nodePlacement.strategy'],
'elk.layered.mergeEdges': data4Layout.config['elk.mergeEdges'],
'nodePlacement.strategy': data4Layout.config.elk?.nodePlacementStrategy,
'elk.layered.mergeEdges': data4Layout.config.elk?.mergeEdges,
'elk.hierarchyHandling': 'SEPARATE_CHILDREN',
};
}