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.86k stars 768 forks source link

If you call oc.init(...) multiple times, some values are not reset resulting in unexpected behavior. #741

Open ValeDale opened 7 months ago

ValeDale commented 7 months ago

Example:

Show an orgchart. Perform a zoom Perform a orgchart.init() with the new data.

New behavior: if you perform now a zoom, the zoom will be in much larger steps (as some variables are not reset).

Expected behavior: normal zoom.

(I will submit a solution for this in a moment). (solution consists of performing an unbind as first step in the bind (I suggest to do this both for pan and zoom).