update: fix names

This commit is contained in:
Braks
2021-10-21 17:42:33 +02:00
parent e9392b13c5
commit 20e9d1d396
23 changed files with 210 additions and 64 deletions
+3 -5
View File
@@ -1,12 +1,10 @@
import { XYPosition } from '~/types'
export function getMousePosition(event: MouseEvent): XYPosition | void {
const revueFlowNode = (event.target as Element).closest('.vue-flow')
if (!revueFlowNode) {
return
}
const flowNode = (event.target as Element).closest('.vue-flow')
if (!flowNode) return
const containerBounds = revueFlowNode.getBoundingClientRect()
const containerBounds = flowNode.getBoundingClientRect()
return {
x: event.clientX - containerBounds.left,