mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-08 08:39:38 +02:00
Clearing sequence diagram before rendering
This commit is contained in:
@@ -631,6 +631,9 @@ function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoop
|
|||||||
export const draw = function (_text: string, id: string, _version: string, diagObj: Diagram) {
|
export const draw = function (_text: string, id: string, _version: string, diagObj: Diagram) {
|
||||||
const { securityLevel, sequence } = configApi.getConfig();
|
const { securityLevel, sequence } = configApi.getConfig();
|
||||||
conf = sequence;
|
conf = sequence;
|
||||||
|
diagObj.db.clear();
|
||||||
|
// Parse the graph definition
|
||||||
|
diagObj.parser.parse(text);
|
||||||
// Handle root and Document for when rendering in sandbox mode
|
// Handle root and Document for when rendering in sandbox mode
|
||||||
let sandboxElement;
|
let sandboxElement;
|
||||||
if (securityLevel === 'sandbox') {
|
if (securityLevel === 'sandbox') {
|
||||||
|
Reference in New Issue
Block a user