This commit is contained in:
2026-02-26 11:45:32 +08:00
parent 11d7093af6
commit 708b1f7a36
53 changed files with 1101 additions and 348 deletions

View File

@@ -0,0 +1,24 @@
export class EventManager {
stateManager: any
vueFlow: any
zoom: any
constructor(options) {
this.stateManager = options.stateManager;
this.vueFlow = options.vueFlow
this.zoom = this.stateManager.zoom
}
handleViewportChange(e: any) {
const { zoom } = e
this.zoom.value = zoom
}
handleNodeDragStop(e: any) {
const { node } = e
const { id, position } = node
this.stateManager.nodes.value.forEach((item) => {
if (item.id === id) {
item.position.x = position.x
item.position.y = position.y
}
})
}
}