feat(core): implement figma controls

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-25 17:38:56 +01:00
committed by Braks
parent f319f6249d
commit fd79ab141d
21 changed files with 381 additions and 317 deletions
@@ -0,0 +1,8 @@
import type { XYPosition } from '~/types'
export function getMousePosition(event: MouseEvent, containerBounds: DOMRect): XYPosition {
return {
x: event.clientX - containerBounds.left,
y: event.clientY - containerBounds.top,
}
}