feat: implement workspaces

This commit is contained in:
Braks
2022-04-04 21:42:48 +02:00
parent cc96739c38
commit cd817b7f53
153 changed files with 8970 additions and 1191 deletions
@@ -0,0 +1,13 @@
import { XYPosition } from '../../types'
export function getMousePosition(event: MouseEvent): XYPosition | void {
const flowNode = (event.target as Element).closest('.vue-flow')
if (!flowNode) return
const containerBounds = flowNode.getBoundingClientRect()
return {
x: event.clientX - containerBounds.left,
y: event.clientY - containerBounds.top,
}
}