diff --git a/packages/vue-flow/src/components/Edges/EdgeText.vue b/packages/vue-flow/src/components/Edges/EdgeText.vue index 1bd714f7..989fe9df 100644 --- a/packages/vue-flow/src/components/Edges/EdgeText.vue +++ b/packages/vue-flow/src/components/Edges/EdgeText.vue @@ -13,12 +13,12 @@ const { labelBgBorderRadius = 2, } = defineProps() -const edgeRef = ref() +const el = ref() let box = $ref({ 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})`)