1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-30 15:43:56 +02:00
This commit is contained in:
syuilo
2025-08-25 13:46:22 +09:00
parent 2b9706a68b
commit 7924daf7f8
17 changed files with 31 additions and 31 deletions

View File

@@ -20,7 +20,7 @@ import { prefer } from '@/preferences.js';
const props = defineProps<{
showing: boolean;
url: string;
anchorEl: HTMLElement;
anchorElement: HTMLElement;
}>();
const emit = defineEmits<{
@@ -32,9 +32,9 @@ const top = ref(0);
const left = ref(0);
onMounted(() => {
const rect = props.anchorEl.getBoundingClientRect();
const x = Math.max((rect.left + (props.anchorEl.offsetWidth / 2)) - (300 / 2), 6) + window.scrollX;
const y = rect.top + props.anchorEl.offsetHeight + window.scrollY;
const rect = props.anchorElement.getBoundingClientRect();
const x = Math.max((rect.left + (props.anchorElement.offsetWidth / 2)) - (300 / 2), 6) + window.scrollX;
const y = rect.top + props.anchorElement.offsetHeight + window.scrollY;
top.value = y;
left.value = x;