Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bubble tree with single child does not populate . #30

Open
vikasbadola opened this issue Feb 6, 2014 · 2 comments
Open

Bubble tree with single child does not populate . #30

vikasbadola opened this issue Feb 6, 2014 · 2 comments

Comments

@vikasbadola
Copy link

Hi , i have a bubble tree with numbers of data from my database , now when i tested it i just noticed that a node with single child is not populating . Can anyone help me ? how can i populate a node with single child on its click .

@ElliotTheRobot
Copy link

Found the problem in bubbletree.js:

line 1146:
if (node.children.length < 2) { // ..because if it has no children..
change to:
if (node.children.length < 1) { // ..because if it has no children..

@mleecollege
Copy link

mleecollege commented Oct 5, 2024

The above is not the only location that you need to make the change. You basically have to go through all the code and change ..children.length <2 to ..children.length <1 and ..children.length >1to ..children.length > 0
There was one more which I modified from if (pc.length > 1) { to if (pc.length > 0) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants