mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 18:30:10 +02:00
#1676 Adding click support to the new rendering engine and classDiagram-v2
This commit is contained in:
@@ -29,6 +29,7 @@ export const addVertices = function(vert, g, svgId) {
|
||||
const keys = Object.keys(vert);
|
||||
|
||||
// Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
|
||||
let cnt = 0;
|
||||
keys.forEach(function(id) {
|
||||
const vertex = vert[id];
|
||||
|
||||
@@ -141,6 +142,9 @@ export const addVertices = function(vert, g, svgId) {
|
||||
class: classStr,
|
||||
style: styles.style,
|
||||
id: vertex.id,
|
||||
link: vertex.link,
|
||||
linkTarget: vertex.linkTarget,
|
||||
domId: 'flow-' + vertex.id + '-' + cnt,
|
||||
width: vertex.type === 'group' ? 500 : undefined,
|
||||
type: vertex.type,
|
||||
padding: getConfig().flowchart.padding
|
||||
@@ -155,10 +159,12 @@ export const addVertices = function(vert, g, svgId) {
|
||||
class: classStr,
|
||||
style: styles.style,
|
||||
id: vertex.id,
|
||||
domId: 'flow-' + vertex.id + '-' + cnt,
|
||||
width: vertex.type === 'group' ? 500 : undefined,
|
||||
type: vertex.type,
|
||||
padding: getConfig().flowchart.padding
|
||||
});
|
||||
cnt++;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user