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

options.compact() does not prevail over data.compact (as documented) #744

Open ValeDale opened 4 months ago

ValeDale commented 4 months ago

This again is related to using oc.init(...) multiple times (which is normal when you are editing online a chart).

When the chart is created, each node gets potentially the data.compact = true value. This is NOT reset currently if you define options.compact to be false and then perform a reinit. The current implementation only can "set" the value to true.

The commit also related to #741 , sets the values of the nodes in line with options.compact.

(Sorry for putting the two issues under one branch. Not sure what the best approach should have been. Anyhow, 2 different commits).