Closed khanhicetea closed 7 years ago
Thank you so much, I will look into it. Enjoy your day, too!
Hi, looks good. I have two comments about the code. Also there is a little bug with the collapsing / expanding animation (nodes collapse vertically but stay at the same place horizontally):
In the correct original animation the nodes collapso to / expand from the parent node:
If these issues are addressed I think we are good to go. Thanks again.
Hi @dundalek ,
I agreed your suggestion ! I fixed 2 comments above, but I couldn't fix the collapsing / expanding animation you mentioned (I am not good at JS and D3, so please help me on that). 😅
Thanks, have a nice weekend !
Yeah, it is very confusing :smiley: For example if I change the line 59
from node.depthWidth = state.depthMaxSize[node.depth];
to node.depthWidth = state.nodeWidth;
the animation starts to work correctly.
Yeah, it works. But, it ignores the rule "Depth width = max width of nodes in depth" so it can makes sub-nodes of a node can show above on a sibling-node having long label.
I think the problem is we need fix on exit event ( x = (x of clicked node + its depthWidth) ), how do you think ?
Yeah thanks, I just found a fix.
👍 I tried your new fix ! It works like a charm !!!
Thank you very much 😄
Sorry, I forgot to commit after running prettier so it's hard to check diff. #14
I re-submit my contribution on new branch.
Thanks, have a nice day !