mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
add props
to vertex
This commit is contained in:
parent
dec6b6d8b5
commit
0550e4a899
@ -49,8 +49,9 @@ export const lookUpDomId = function (id) {
|
|||||||
* @param type
|
* @param type
|
||||||
* @param style
|
* @param style
|
||||||
* @param classes
|
* @param classes
|
||||||
|
* @param props
|
||||||
*/
|
*/
|
||||||
export const addVertex = function (_id, text, type, style, classes, dir) {
|
export const addVertex = function (_id, text, type, style, classes, dir, props = {}) {
|
||||||
let txt;
|
let txt;
|
||||||
let id = _id;
|
let id = _id;
|
||||||
if (typeof id === 'undefined') {
|
if (typeof id === 'undefined') {
|
||||||
@ -106,6 +107,7 @@ export const addVertex = function (_id, text, type, style, classes, dir) {
|
|||||||
if (typeof dir !== 'undefined') {
|
if (typeof dir !== 'undefined') {
|
||||||
vertices[id].dir = dir;
|
vertices[id].dir = dir;
|
||||||
}
|
}
|
||||||
|
vertices[id].props = props
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user