BALKANGraph / OrgChartJS

OrgChart JS is a simple, flexible and highly customizable organization chart plugin for presenting the structure of your organization and the relationships in an elegant way.
https://balkan.app/orgchartjs
250 stars 85 forks source link

location of the node randomly changes after reload #831

Closed ryanlaw closed 6 months ago

ryanlaw commented 6 months ago

Hi team,

I have noticed the node's location when being created may be different if reload the chart after saving.

Is that normal behaviour? normally the graph would be expected to stay the way it was created.

Regards

ZornitsaPesheva commented 6 months ago

Could you please show us in an example what exactly you mean?

ryanlaw commented 6 months ago

Thanks for your reply @ZornitsaPesheva ,

Initially, the chart is as below: image After adding a node (red circle): image this node will be saved to DB. and after reload: image The location of the node changes compared to when it was created.

Hoping this explains my issue clearly.

Regards

ZornitsaPesheva commented 6 months ago

I understand the issue. You can use the orderBy property to change the order of the nodes.

ryanlaw commented 6 months ago

Thanks, that solved my issue.