【V4】如何在第二层节点的尺寸大于其他节点尺寸时避免第二层节点重合并保证布局美观性?(How can I avoid the overlap of second-level nodes when their size is larger than that of other nodes while ensuring an aesthetically pleasing layout?) #6615
Unanswered
little-spoon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
中文版描述:
需求描述:我想使用紧凑树布局实现下面这种在同一个画布中管理"多棵树"效果:
我采用的思路:左侧统一接一个透明根节点,自定义第二层节点。
产生问题:第二层节点的尺寸会比其他节点尺寸更大,当间隙调整的不合适的时候,第二层节点会重合,就像这样:
我尝试单独调整第二层的getVGap和getHeight,会产生这样的效果:第二层节点是不重合了,但是其他节点没有跟随第二层节点进行布局,还是停留在原来的位置。
如何在第二层节点的尺寸大于其他节点尺寸时避免第二层节点重合并保证布局美观性?
感谢解答!
English:
Requirement Description:
I want to use the compact tree layout to achieve the effect of managing "multiple trees" on the same canvas.
My Approach:
I connect all the trees to a transparent root node on the left and customize the second-level nodes.
Problem Encountered:
The size of the second-level nodes is larger than that of other nodes. When the spacing is not adjusted properly, the second-level nodes overlap, as shown below.
I tried adjusting the getVGap and getHeight for the second-level nodes separately, which resolved the overlap issue for the second-level nodes. However, the downstream nodes did not follow the second-level nodes during the layout process and remained in their original positions.
Question:
How can I avoid the overlap of second-level nodes when their size is larger than that of other nodes while ensuring an aesthetically pleasing layout?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions