1
0
forked from noxious/client

Max 2. pivot points

This commit is contained in:
Dennis Postma 2025-02-15 17:57:30 +01:00
parent d843b954ab
commit 94eab073e6

View File

@ -163,6 +163,8 @@ onMounted(() => {
function addPivotPoint(event: MouseEvent) { function addPivotPoint(event: MouseEvent) {
if (!imageRef.value) return if (!imageRef.value) return
// Max 2
if (mapObjectPivotPoints.value.length >= 2) return
const rect = imageRef.value.getBoundingClientRect() const rect = imageRef.value.getBoundingClientRect()
const x = event.clientX - rect.left const x = event.clientX - rect.left
const y = event.clientY - rect.top const y = event.clientY - rect.top