新增方法

This commit is contained in:
wanglin
2022-07-31 22:29:40 +08:00
parent 0e8c50d430
commit f11f364d00

View File

@@ -167,6 +167,24 @@ class Base {
return layerIndex === 1 ? this.mindMap.themeConfig.second.marginY : this.mindMap.themeConfig.node.marginY;
}
/**
* @Author: 王林
* @Date: 2022-07-31 20:53:12
* @Desc: 获取节点包括概要在内的宽度
*/
getNodeWidthWithGeneralization(node) {
return Math.max(node.width, node._generalizationNode ? node._generalizationNode.width : 0)
}
/**
* @Author: 王林
* @Date: 2022-07-31 20:53:12
* @Desc: 获取节点包括概要在内的高度
*/
getNodeHeightWithGeneralization(node) {
return Math.max(node.height, node._generalizationNode ? node._generalizationNode.height : 0)
}
/**
* @Author: 王林
* @Date: 2022-07-31 09:14:03