mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Revert "chore: Defer elk loading"
This reverts commit 037504785c26dd18ee797cfdf93a5e9f5f551f6a.
This commit is contained in:
parent
b8b8c4740a
commit
65f5f9dc45
@ -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 = {};
|
||||
|
||||
@ -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 = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user