mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-21 16:29:40 +02:00
@@ -9,8 +9,8 @@ import { log } from '../../../logger';
|
|||||||
import { setupGraphViewbox } from '../../../setupGraphViewbox';
|
import { setupGraphViewbox } from '../../../setupGraphViewbox';
|
||||||
import common, { evaluate } from '../../common/common';
|
import common, { evaluate } from '../../common/common';
|
||||||
import { interpolateToCurve, getStylesFromArray } from '../../../utils';
|
import { interpolateToCurve, getStylesFromArray } from '../../../utils';
|
||||||
|
import ELK from 'elkjs/lib/elk.bundled.js';
|
||||||
let elk;
|
const elk = new ELK();
|
||||||
|
|
||||||
const portPos = {};
|
const portPos = {};
|
||||||
|
|
||||||
@@ -765,10 +765,6 @@ const insertChildren = (nodeArray, parentLookupDb) => {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const draw = async function (text, id, _version, diagObj) {
|
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
|
// Add temporary render element
|
||||||
diagObj.db.clear();
|
diagObj.db.clear();
|
||||||
nodeDb = {};
|
nodeDb = {};
|
||||||
|
Reference in New Issue
Block a user