Dynamic elk import

This commit is contained in:
Sidharth Vinod 2023-02-16 14:42:47 +05:30
parent 76fdc00b06
commit b8315cec6c
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,6 @@ import { log } from '../../../logger';
import { setupGraphViewbox } from '../../../setupGraphViewbox';
import common, { evaluate } from '../../common/common';
import { interpolateToCurve, getStylesFromArray } from '../../../utils';
import ELK from 'elkjs/lib/elk.bundled.js';
let elk;
@ -767,6 +766,7 @@ const insertChildren = (nodeArray, parentLookupDb) => {
export const draw = async function (text, id, _version, diagObj) {
if (!elk) {
const ELK = await import('elkjs/lib/elk.bundled.js');
elk = new ELK();
}
// Add temporary render element