mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 22:09:57 +02:00
Use graphlibrary
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
"d3": "3.5.17",
|
"d3": "3.5.17",
|
||||||
"dagre-d3-renderer": "0.4.25",
|
"dagre-d3-renderer": "0.4.25",
|
||||||
"dagre-layout": "^0.8.6",
|
"dagre-layout": "^0.8.6",
|
||||||
|
"graphlibrary": "^2.2.0",
|
||||||
"he": "^1.1.1",
|
"he": "^1.1.1",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
"moment": "^2.21.0"
|
"moment": "^2.21.0"
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import dagre from 'dagre-layout'
|
import dagre from 'dagre-layout'
|
||||||
|
import graphlib from 'graphlibrary'
|
||||||
|
|
||||||
import classDb from './classDb'
|
import classDb from './classDb'
|
||||||
import d3 from '../../d3'
|
import d3 from '../../d3'
|
||||||
@@ -311,7 +312,7 @@ export const draw = function (text, id) {
|
|||||||
insertMarkers(diagram)
|
insertMarkers(diagram)
|
||||||
|
|
||||||
// Layout graph, Create a new directed graph
|
// Layout graph, Create a new directed graph
|
||||||
const g = new dagre.graphlib.Graph({
|
const g = new graphlib.Graph({
|
||||||
multigraph: true
|
multigraph: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
import graphlib from 'graphlibrary'
|
||||||
|
|
||||||
import graphDb from './graphDb'
|
import graphDb from './graphDb'
|
||||||
import flow from './parser/flow'
|
import flow from './parser/flow'
|
||||||
import dot from './parser/dot'
|
import dot from './parser/dot'
|
||||||
@@ -265,7 +267,7 @@ export const draw = function (text, id, isDot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the input mermaid.graph
|
// Create the input mermaid.graph
|
||||||
const g = new dagreD3.graphlib.Graph({
|
const g = new graphlib.Graph({
|
||||||
multigraph: true,
|
multigraph: true,
|
||||||
compound: true
|
compound: true
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user