mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 18:24:33 +01:00
#1295 Edges between subgraphs
This commit is contained in:
@@ -32,7 +32,7 @@ const rect = (parent, node) => {
|
||||
.attr('width', node.width + padding)
|
||||
.attr('height', node.height + padding);
|
||||
|
||||
logger.info('bbox', bbox.width, node.x, node.width);
|
||||
// logger.info('bbox', bbox.width, node.x, node.width);
|
||||
// Center the label
|
||||
// label.attr('transform', 'translate(' + adj + ', ' + (node.y - node.height / 2) + ')');
|
||||
label.attr(
|
||||
@@ -57,7 +57,7 @@ const rect = (parent, node) => {
|
||||
|
||||
const shapes = { rect };
|
||||
|
||||
const clusterElems = {};
|
||||
let clusterElems = {};
|
||||
|
||||
export const insertCluster = (elem, node) => {
|
||||
clusterElems[node.id] = shapes[node.shape](elem, node);
|
||||
@@ -70,6 +70,10 @@ export const getClusterTitleWidth = (elem, node) => {
|
||||
return width;
|
||||
};
|
||||
|
||||
export const clear = () => {
|
||||
clusterElems = {};
|
||||
};
|
||||
|
||||
export const positionCluster = node => {
|
||||
const el = clusterElems[node.id];
|
||||
el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');
|
||||
|
||||
Reference in New Issue
Block a user