深度画布框架

This commit is contained in:
lzp
2026-03-06 15:50:05 +08:00
parent a3938662c9
commit d0d8c0ab9b
47 changed files with 3827 additions and 88 deletions

View File

@@ -0,0 +1,26 @@
export class FlowManager {
stateManager: any
vueFlow: any
constructor(options) {
this.stateManager = options.stateManager;
this.vueFlow = options.vueFlow
}
setZoom(zoom: number) {
this.stateManager.zoom.value = zoom
this.vueFlow.value.zoomTo(zoom)
}
getNodeById(id: string) {
return this.vueFlow.value.getNode(id)
}
getLastNode() {
const lastNode = this.stateManager.getLastNode()
if (lastNode?.id) {
return this.vueFlow.value.getNode(lastNode.id)
}
return null;
}
getSubordNodeByID(id: string) {
return this.vueFlow.value.getNodes?.find((v) => v.data.superiorID === id)
}
}