mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 15:59:51 +02:00
Using cose-bilkent layout algorithm for mindmaps
This commit is contained in:
@@ -164,6 +164,7 @@ const roundedRectBkg = function (elem, node) {
|
||||
*/
|
||||
export const drawNode = function (elem, node, section, conf) {
|
||||
const nodeElem = elem.append('g');
|
||||
node.section = section;
|
||||
nodeElem.attr(
|
||||
'class',
|
||||
(node.class ? node.class + ' ' : '') +
|
||||
@@ -252,9 +253,9 @@ export const drawNode = function (elem, node, section, conf) {
|
||||
}
|
||||
|
||||
// Position the node to its coordinate
|
||||
if (typeof node.x !== 'undefined' && typeof node.y !== 'undefined') {
|
||||
nodeElem.attr('transform', 'translate(' + node.x + ',' + node.y + ')');
|
||||
}
|
||||
// if (typeof node.x !== 'undefined' && typeof node.y !== 'undefined') {
|
||||
// nodeElem.attr('transform', 'translate(' + node.x + ',' + node.y + ')');
|
||||
// }
|
||||
db.setElementForId(node.id, nodeElem);
|
||||
return node.height;
|
||||
};
|
||||
|
Reference in New Issue
Block a user