add `props` to vertex

This commit is contained in:
Michael Maier 2021-11-28 12:11:50 +01:00
parent dec6b6d8b5
commit 0550e4a899
1 changed files with 3 additions and 1 deletions

View File

@ -49,8 +49,9 @@ export const lookUpDomId = function (id) {
* @param type
* @param style
* @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 id = _id;
if (typeof id === 'undefined') {
@ -106,6 +107,7 @@ export const addVertex = function (_id, text, type, style, classes, dir) {
if (typeof dir !== 'undefined') {
vertices[id].dir = dir;
}
vertices[id].props = props
};
/**