Bugfix for port selection when using diamonds in elk layout of flowcharts

This commit is contained in:
Knut Sveidqvist 2023-03-29 16:17:30 +02:00
parent 4caf7d7c7b
commit 507a518a91

View File

@ -13,7 +13,7 @@ import { interpolateToCurve, getStylesFromArray } from '../../../utils';
import ELK from 'elkjs/lib/elk.bundled.js'; import ELK from 'elkjs/lib/elk.bundled.js';
const elk = new ELK(); const elk = new ELK();
const portPos = {}; let portPos = {};
const conf = {}; const conf = {};
export const setConf = function (cnf) { export const setConf = function (cnf) {
@ -767,6 +767,7 @@ export const draw = async function (text, id, _version, diagObj) {
// Add temporary render element // Add temporary render element
diagObj.db.clear(); diagObj.db.clear();
nodeDb = {}; nodeDb = {};
portPos = {};
diagObj.db.setGen('gen-2'); diagObj.db.setGen('gen-2');
// Parse the graph definition // Parse the graph definition
diagObj.parser.parse(text); diagObj.parser.parse(text);