You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In cases where no nodes list is supplied and the root node is used, the fit function doesn't take the root node's location into account along with its descendants. It doesn't distinguish between expanded and unexpanded nodes.
The bug is in the line that defines the descendants.
Currently...
let descendants = nodes ? nodes : root.descendants();
Describe the bug
In cases where no nodes list is supplied and the root node is used, the fit function doesn't take the root node's location into account along with its descendants. It doesn't distinguish between expanded and unexpanded nodes.
The bug is in the line that defines the descendants.
Currently...
let descendants = nodes ? nodes : root.descendants();
...and what I think it should be...
const descendants = nodes ? nodes : [root].concat(root.descendants().filter(d => d.data._expanded === true));
The text was updated successfully, but these errors were encountered: