mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 15:30:03 +02:00
Fix for direction issue with elk rendering
This commit is contained in:
@@ -313,6 +313,7 @@ const getNextPosition = (position, edgeDirection, graphDirection) => {
|
||||
},
|
||||
},
|
||||
};
|
||||
portPos.TD = portPos.TB;
|
||||
log.info('abc88', graphDirection, edgeDirection, position);
|
||||
return portPos[graphDirection][edgeDirection][position];
|
||||
// return 'south';
|
||||
@@ -323,6 +324,7 @@ const getNextPort = (node, edgeDirection, graphDirection) => {
|
||||
if (!portPos[node]) {
|
||||
switch (graphDirection) {
|
||||
case 'TB':
|
||||
case 'TD':
|
||||
portPos[node] = {
|
||||
inPosition: 'north',
|
||||
outPosition: 'south',
|
||||
|
@@ -238,6 +238,9 @@ export const setDirection = function (dir) {
|
||||
if (direction.match(/.*v/)) {
|
||||
direction = 'TB';
|
||||
}
|
||||
if (direction === 'TD') {
|
||||
direction = 'TB';
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user