fperucic / treant-js

Treant.js - javascript library for drawing tree diagrams
MIT License
864 stars 314 forks source link

over 100 nodes #162

Closed amix4260 closed 4 years ago

amix4260 commented 4 years ago

Hi, first of all thank you for this add-on, which has helped me a lot. Well it happens that I have over 100 nodes online and it is throwing an error in the file "raphaels.js", line (5588) function:

var $ = function (el, attr) { if (attr) { if (typeof el == "string") { el = $(el); } for (var key in attr) if (attr[has](key)) { if (key.substring(0, 6) == "xlink:") { el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); } else { **el.setAttribute(key, Str(attr[key]));** ///this part Error: <path> attribute d: Expected number, "M,0,0". } } } else { el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); } return el; },

Then nodes 101 and 102 appear to me. As follows image

The other nodes do not appear example... 103, 104,.... 200. I hope you can help me. Bye

amix4260 commented 4 years ago

Hi, I found out that the problem is the svg control when node 100 is connected onwards. The nodes generate them but they are not connected. Any suggestion???,please!!!, thanks

amix4260 commented 4 years ago

hi i finally found the solution. In tree property, change the value of "maxDepth".