dabeng / OrgChart.js

It's a simple and direct organization chart plugin. Anytime you want a tree-like chart, you can turn to OrgChart.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Toggle siblings resp not working ?

bigopon opened this issue · comments

Hi, I tried to pass in option: toggleSiblingsResp but it doesn't seem to be working.

  orgchart = new OrgChart({
    'chartContainer': '#chart-container',
    'data' : datascource,
    nodeContent: 'title',
    toggleSiblingsResp: false
  });

Another question is how can I disable toggle parent ? I want to limit ability to hide parent of a child node.

Hi @bigopon, if you wanna enable the feature -- toggle the sibling nodes(left or right) respectively, you just need to set this option to true

As for the second question, you just need a little css trick to hide top arrow of every child node

Hi, can you elaborate ? I couldn't find it in the source code.

When users click the top arrow of every child node, the patent node will be collapsed/expanded, so you just need to control the visibility of top arrow, then you can limit the ability to hide parent node.

@dabeng I'm running into a similar issue as @bigopon. When I set

'toggleSiblingsResp': false

the left/right toggle arrows still show on hover, and function as if they were set to true

'toggleSiblingsResp': false

It doesn't work still.