From 9fbb976d00a020e486cd0cd1bbb437f47d0289ea Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Wed, 26 Jun 2024 14:04:57 +0300 Subject: [PATCH] update values --- front/src/components/Promo/gallery.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/front/src/components/Promo/gallery.vue b/front/src/components/Promo/gallery.vue index 9114b73..a395a71 100644 --- a/front/src/components/Promo/gallery.vue +++ b/front/src/components/Promo/gallery.vue @@ -81,11 +81,10 @@ onMounted(async () => { } if (document.querySelector('.pin')) { - setTimeout(() => { - const rect = (document.querySelector('.pin') as HTMLElement).getBoundingClientRect() - circles[circles.length - 1] = { x: rect.x + rect.width, y: rect.y + rect.height } - circles[circles.length - 2] = { x: rect.x, y: rect.y } - }, 300) + const rect = (document.querySelector('.pin') as HTMLElement).getBoundingClientRect() + circles[circles.length - 1] = { x: rect.x + rect.width, y: rect.y + rect.height } + circles[circles.length - 2] = { x: rect.x, y: rect.y } + update() } })