chore(edges): correct edge text ref name
This commit is contained in:
@@ -13,12 +13,12 @@ const {
|
|||||||
labelBgBorderRadius = 2,
|
labelBgBorderRadius = 2,
|
||||||
} = defineProps<EdgeTextProps>()
|
} = defineProps<EdgeTextProps>()
|
||||||
|
|
||||||
const edgeRef = ref<SVGTextElement>()
|
const el = ref<SVGTextElement>()
|
||||||
|
|
||||||
let box = $ref<RectType>({ x: 0, y: 0, width: 0, height: 0 })
|
let box = $ref<RectType>({ x: 0, y: 0, width: 0, height: 0 })
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
box = edgeRef.value!.getBBox()
|
box = el.value!.getBBox()
|
||||||
})
|
})
|
||||||
|
|
||||||
const transform = computed(() => `translate(${x - box.width / 2} ${y - box.height / 2})`)
|
const transform = computed(() => `translate(${x - box.width / 2} ${y - box.height / 2})`)
|
||||||
|
|||||||
Reference in New Issue
Block a user