mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 05:49:43 +02:00
Do explicit imports for d3 instead of wildcards
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import graphlib from 'graphlib';
|
||||
import * as d3 from 'd3';
|
||||
import { select } from 'd3';
|
||||
import stateDb from './stateDb';
|
||||
import state from './parser/stateDiagram';
|
||||
import { getConfig } from '../../config';
|
||||
@@ -245,10 +245,10 @@ export const draw = function(text, id) {
|
||||
setupNode(g, undefined, stateDb.getRootDocV2(), true);
|
||||
|
||||
// Set up an SVG group so that we can translate the final graph.
|
||||
const svg = d3.select(`[id="${id}"]`);
|
||||
const svg = select(`[id="${id}"]`);
|
||||
|
||||
// Run the renderer. This is what draws the final graph.
|
||||
const element = d3.select('#' + id + ' g');
|
||||
const element = select('#' + id + ' g');
|
||||
render(element, g, ['barb'], 'statediagram', id);
|
||||
|
||||
const padding = 8;
|
||||
|
Reference in New Issue
Block a user