I've been trying to refactor this example of a collapsible tree to work in d3 v5. However, the zooming / centering functionality seems to have broken. If I click on a node to center on it, then zoom in / out, the zooming translates to the point where the previous zooming occurred, it doesn't take into account the centerNode function. This all seems to be working great in v4. Vice versa, after zooming if i click on a node to center it, the translation starts from the last centering (now it is not taking the zooming translation into account)
my fiddle: https://jsfiddle.net/k8ebfvyo/4/
note: I have asked this question on stackoverflow already, but haven't had any luck.
I've been trying to refactor this example of a collapsible tree to work in d3 v5. However, the zooming / centering functionality seems to have broken. If I click on a node to center on it, then zoom in / out, the zooming translates to the point where the previous zooming occurred, it doesn't take into account the
centerNode
function. This all seems to be working great in v4. Vice versa, after zooming if i click on a node to center it, the translation starts from the last centering (now it is not taking the zooming translation into account) my fiddle: https://jsfiddle.net/k8ebfvyo/4/ note: I have asked this question on stackoverflow already, but haven't had any luck.