mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-21 09:16:41 +02:00
fix for direction
This commit is contained in:
@@ -48,6 +48,7 @@ function newClassesList() {
|
|||||||
|
|
||||||
let nodes = [];
|
let nodes = [];
|
||||||
let edges = [];
|
let edges = [];
|
||||||
|
|
||||||
let direction = DEFAULT_DIAGRAM_DIRECTION;
|
let direction = DEFAULT_DIAGRAM_DIRECTION;
|
||||||
let rootDoc = [];
|
let rootDoc = [];
|
||||||
let classes = newClassesList(); // style classes defined by a classDef
|
let classes = newClassesList(); // style classes defined by a classDef
|
||||||
@@ -221,7 +222,6 @@ const extract = (_doc) => {
|
|||||||
const look = config.look;
|
const look = config.look;
|
||||||
resetDataFetching();
|
resetDataFetching();
|
||||||
dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);
|
dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);
|
||||||
|
|
||||||
nodes.forEach((node) => {
|
nodes.forEach((node) => {
|
||||||
if (Array.isArray(node.label)) {
|
if (Array.isArray(node.label)) {
|
||||||
// add the rest as description
|
// add the rest as description
|
||||||
@@ -237,8 +237,6 @@ const extract = (_doc) => {
|
|||||||
node.label = node.label[0];
|
node.label = node.label[0];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
direction = getDir(getRootDocV2());
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -591,7 +589,7 @@ const trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.t
|
|||||||
|
|
||||||
export const getData = () => {
|
export const getData = () => {
|
||||||
const config = getConfig();
|
const config = getConfig();
|
||||||
return { nodes, edges, other: {}, config, direction };
|
return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
Reference in New Issue
Block a user