chore(edges): correct edge text ref name

This commit is contained in:
braks
2022-10-07 22:55:38 +02:00
committed by Braks
parent 78c8bc7a34
commit 09476f061b
@@ -13,12 +13,12 @@ const {
labelBgBorderRadius = 2,
} = defineProps<EdgeTextProps>()
const edgeRef = ref<SVGTextElement>()
const el = ref<SVGTextElement>()
let box = $ref<RectType>({ x: 0, y: 0, width: 0, height: 0 })
onMounted(() => {
box = edgeRef.value!.getBBox()
box = el.value!.getBBox()
})
const transform = computed(() => `translate(${x - box.width / 2} ${y - box.height / 2})`)