Fix:不完美修复组织结构图概要和节点冲突的问题
This commit is contained in:
parent
fb41653d79
commit
2590e21807
@ -57,6 +57,10 @@ class OrganizationStructure extends Base {
|
|||||||
}, 0) +
|
}, 0) +
|
||||||
(len + 1) * this.getMarginY(layerIndex + 1)
|
(len + 1) * this.getMarginY(layerIndex + 1)
|
||||||
: 0
|
: 0
|
||||||
|
|
||||||
|
// 如果存在概要,则和概要的高度取最大值
|
||||||
|
let generalizationNodeWidth = cur._node.checkHasGeneralization() ? cur._node._generalizationNodeWidth + this.getMarginY(layerIndex + 1) : 0
|
||||||
|
cur._node.childrenAreaWidth2 = Math.max(cur._node.childrenAreaWidth, generalizationNodeWidth)
|
||||||
},
|
},
|
||||||
true,
|
true,
|
||||||
0
|
0
|
||||||
@ -100,7 +104,7 @@ class OrganizationStructure extends Base {
|
|||||||
}
|
}
|
||||||
// 判断子节点所占的宽度之和是否大于该节点自身,大于则需要调整位置
|
// 判断子节点所占的宽度之和是否大于该节点自身,大于则需要调整位置
|
||||||
let difference =
|
let difference =
|
||||||
node.childrenAreaWidth -
|
node.childrenAreaWidth2 -
|
||||||
this.getMarginY(layerIndex + 1) * 2 -
|
this.getMarginY(layerIndex + 1) * 2 -
|
||||||
node.width
|
node.width
|
||||||
if (difference > 0) {
|
if (difference > 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user