mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-20 07:49:43 +02:00
#3882 fix for issues with mindmaps with only a single node
This commit is contained in:
@@ -92,10 +92,6 @@ function addNodes(mindmap, cy, conf, level) {
|
|||||||
*/
|
*/
|
||||||
function layoutMindmap(node, conf) {
|
function layoutMindmap(node, conf) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
if (node.children.length === 0) {
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add temporary render element
|
// Add temporary render element
|
||||||
const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');
|
const renderEl = select('body').append('div').attr('id', 'cy').attr('style', 'display:none');
|
||||||
const cy = cytoscape({
|
const cy = cytoscape({
|
||||||
|
Reference in New Issue
Block a user