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

[Treantjs]: How to make the root node collapsed? #116

Open
egor-progger opened this issue Dec 22, 2024 · 0 comments
Open

[Treantjs]: How to make the root node collapsed? #116

egor-progger opened this issue Dec 22, 2024 · 0 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed treantjs Issue from treantjs repository

Comments

@egor-progger
Copy link
Owner

egor-progger commented Dec 22, 2024

Description from treantjs issue

Hi,

I want to make the root node collapsed. Here is what my configuration:

{"chart":{"container":"#ngpTree","animateOnInit":true,"node":{"collapsable":true},"animation":{"nodeAnimation":"easeOutBounce","nodeSpeed":700,"connectorsAnimation":"bounce","connectorsSpeed":700}},"nodeStructure":{"collapsed":true,"innerHTML":"\n

=>=>7 1 2 3 4 \n ","text":{"name":7},"children":[{"collapsed":true,"innerHTML":"\n=>=>3 1 3 \n ","text":{"name":3},"children":[{"collapsed":true,"innerHTML":"\n=>=>0 1 \n ","text":{"name":0},"children":[]}]},{"collapsed":true,"innerHTML":"\n=>=>3 1 2 \n ","text":{"name":3},"children":[{"collapsed":true,"innerHTML":"\n=>=>1 1 \n ","text":{"name":1},"children":[]}]}]}}

You see in nodeStructure of root node, I set collapsed to true as what I did for each child node:

"nodeStructure":{"collapsed":true,"innerHTML":....

However the root node still is not collapsed, the children nodes are collapsed as I wanted.

Is this the way I make the root node collapsed? If not, how?

Thanks,

Stephen

Treantjs issue link

fperucic/treant-js#145

@egor-progger egor-progger added help wanted Extra attention is needed good first issue Good for newcomers treantjs Issue from treantjs repository labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed treantjs Issue from treantjs repository
Projects
None yet
Development

No branches or pull requests

1 participant