mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
fix: vertex property props
is overwritten instead of being merged with new value
Fixes #3263
This commit is contained in:
parent
8ffa7e6334
commit
7e8631dd19
@ -119,7 +119,11 @@ export const addVertex = function (_id, text, type, style, classes, dir, props =
|
|||||||
if (typeof dir !== 'undefined') {
|
if (typeof dir !== 'undefined') {
|
||||||
vertices[id].dir = dir;
|
vertices[id].dir = dir;
|
||||||
}
|
}
|
||||||
|
if (typeof vertices[id].props === 'undefined') {
|
||||||
vertices[id].props = props;
|
vertices[id].props = props;
|
||||||
|
} else if (typeof props !== 'undefined') {
|
||||||
|
Object.assign(vertices[id].props, props);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user