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 } }) } }