Fix for direction issue with elk rendering

This commit is contained in:
Knut Sveidqvist 2023-02-15 15:12:52 +01:00
parent aef989fe03
commit 343e48302e
2 changed files with 5 additions and 0 deletions

View File

@ -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',

View File

@ -238,6 +238,9 @@ export const setDirection = function (dir) {
if (direction.match(/.*v/)) {
direction = 'TB';
}
if (direction === 'TD') {
direction = 'TB';
}
};
/**