mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 22:08:25 +08:00
新增方法
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user