This commit is contained in:
X1627315083@163.com
2026-03-13 13:49:07 +08:00
parent 6596208c11
commit 401e02f901
2 changed files with 22 additions and 19 deletions

View File

@@ -145,6 +145,8 @@ export class StateManager {
setNodesDraggable(v: boolean) { this.nodesDraggable.value = v }
/** 设置是否可以平移画布 */
setPanOnDrag(v: boolean) { this.panOnDrag.value = v }
/** 获取所有下级节点 */
getSubordNodes(id: string) { return this.nodes.value.filter((node: NodesItem) => node.data.superiorID === id) }
/** 设置节点层级至最顶部 */
bringToFont(id) {
const fromIndex = this.nodes.value.findIndex(item => item.id === id)