OrgChart
OrgChart copied to clipboard
bindZoom() called twice on init
Following the example at: http://dabeng.github.io/OrgChart/reload-data.html
I need to reload chart with new data when I click a 'refresh' button, calling:
oc.init({ 'data': datasource });
With the option:
'zoom': true
oc.init()
call bindZoom()
every time that oc is initalizated, so the mouse wheel event is raised multiple times, with unespected zoom levels. (It multiplies zoom factor n times)
It seems that the same issue exists with the use of function: setOptions()
file : jquery.orgchart.js Solution : Add a call to unbind the zoom in 'bindZoom' function.
L:300 bindZoom: function () { L:301 (new raw) this.unbindZoom();
file : jquery.orgchart.js Solution : Add a call to unbind the zoom in 'bindZoom' function.
L:300 bindZoom: function () { L:301 (new raw) this.unbindZoom();
hello, thank you, this solution has worked for me! maybe do a pull request? if you don't want to, I can do it