dabeng / OrgChart

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.
MIT License
2.83k stars 767 forks source link

showSiblings function does not remove `isChildrenCollapsed` class #705

Open BradenR88 opened 1 year ago

BradenR88 commented 1 year ago

The hideSiblings function adds the class isChildrenCollapsed class at https://github.com/dabeng/OrgChart/blob/ba2baa14d8640d1c8f03c4add657a9e9e892dfb2/src/js/jquery.orgchart.js#LL638C13-L638C13 and https://github.com/dabeng/OrgChart/blob/ba2baa14d8640d1c8f03c4add657a9e9e892dfb2/src/js/jquery.orgchart.js#LL643C1-L643C1 .

The 'showSiblings' does not remove this class.

I was using CSS to style nodes with children differently than those without children by using this isChildrenCollapsed class, but when you hide and re-show sibblings, the isChildrenCollapsed remains for all siblings and so they all become formatted the same.