Skip to content

Commit

Permalink
Revert "chore: Defer elk loading"
Browse files Browse the repository at this point in the history
This reverts commit 0375047.
  • Loading branch information
sidharthv96 committed Feb 28, 2023
1 parent b8b8c47 commit 65f5f9d
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { log } from '../../../logger';
import { setupGraphViewbox } from '../../../setupGraphViewbox';
import common, { evaluate } from '../../common/common';
import { interpolateToCurve, getStylesFromArray } from '../../../utils';

let elk;
import ELK from 'elkjs/lib/elk.bundled.js';
const elk = new ELK();

const portPos = {};

Expand Down Expand Up @@ -765,10 +765,6 @@ const insertChildren = (nodeArray, parentLookupDb) => {
*/

export const draw = async function (text, id, _version, diagObj) {
if (!elk) {
const ELK = (await import('elkjs/lib/elk.bundled.js')).default;
elk = new ELK();
}
// Add temporary render element
diagObj.db.clear();
nodeDb = {};
Expand Down

0 comments on commit 65f5f9d

Please sign in to comment.