David-Desmaisons / Vue.D3.tree

Vue component to display tree based on D3.js layout.
https://david-desmaisons.github.io/Vue.D3.tree/tree
MIT License
874 stars 136 forks source link

Expected number > undefined #75

Open Moonflakes opened 3 years ago

Moonflakes commented 3 years ago

Hello, I have multiple expected number errors for path and g in the console :

Error: <path> attribute d: Expected number, "M undefined,undefi…".
Error: <g> attribute transform: Expected number, "translate( NaN,NaN ) rotate…".

Do you know what is this due to ? (data is in the right format)

KUGDev commented 2 years ago

Hi I've made some initial investigation and found out that it is somehow related to the 'updateIfNeeded' function in /src/Tree.vue. Not sure what is the cause, but when I tried to use 'collapseAll' on my tree in 'mounted' section, for the first time after a window reload it was causing an error in the console, but the next time I open the tree, everything is ok with it. When I added 'update = false' to 'collapseAll' function, the issue had gone