How to collapse only children in OrgChart?

539 views Asked by At

I found this awesome library for creating organizational charts called OrgChart.

Here it is what it looks like: enter image description here

The green arrows allow you to collapse the parents/children/siblings nodes. You can try it here to see what I mean: example

My goal is to remove all the green arrows except the children ones so that I can collapse only vertically starting from the very top of the organization. Do you have any idea how I can reach such result please?

Thanks in advance.

1

There are 1 answers

0
Federico Gentile On BEST ANSWER

I found the solution to my problem:

In the file jquery.orgchart.js you need to remove from all the tags the following items:

  • class="edge horizontalEdge rightEdge oci"
  • class="edge horizontalEdge leftEdge oci"
  • class="edge verticalEdge topEdge oci"

So that you are only left with <i class="edge verticalEdge bottomEdge oci"></i> and all the other tags are <i></i>

enter image description here