fix(脑图): 展开节点刷新布局

This commit is contained in:
baiqi 2024-08-16 11:24:06 +08:00 committed by Craftsman
parent 0367e10488
commit 126d693caf
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ export default function useMinderOperation(options: MinderOperationProps) {
if (!options.customPriority) { if (!options.customPriority) {
// 展开后,需要设置一次优先级展示,避免展开后优先级显示成脑图内置文案;如果设置了自定义优先级,则不在此设置,由外部自行处理 // 展开后,需要设置一次优先级展示,避免展开后优先级显示成脑图内置文案;如果设置了自定义优先级,则不在此设置,由外部自行处理
setPriorityView(!!options.priorityStartWithZero, options.priorityPrefix || ''); setPriorityView(!!options.priorityStartWithZero, options.priorityPrefix || '');
window.minder.refresh();
} }
window.minder.refresh();
minderStore.dispatchEvent(MinderEventName.COLLAPSE, undefined, undefined, undefined, selectedNodes); minderStore.dispatchEvent(MinderEventName.COLLAPSE, undefined, undefined, undefined, selectedNodes);
} else { } else {
// 选中的节点集合中有一个节点未展开,则全部展开 // 选中的节点集合中有一个节点未展开,则全部展开
@ -286,8 +286,8 @@ export default function useMinderOperation(options: MinderOperationProps) {
if (!options.customPriority) { if (!options.customPriority) {
// 展开后,需要设置一次优先级展示,避免展开后优先级显示成脑图内置文案;如果设置了自定义优先级,则不在此设置,由外部自行处理 // 展开后,需要设置一次优先级展示,避免展开后优先级显示成脑图内置文案;如果设置了自定义优先级,则不在此设置,由外部自行处理
setPriorityView(!!options.priorityStartWithZero, options.priorityPrefix || ''); setPriorityView(!!options.priorityStartWithZero, options.priorityPrefix || '');
window.minder.refresh();
} }
window.minder.refresh();
minderStore.dispatchEvent(MinderEventName.EXPAND, undefined, undefined, undefined, selectedNodes); minderStore.dispatchEvent(MinderEventName.EXPAND, undefined, undefined, undefined, selectedNodes);
} }
}; };