/
Netrunners
/
Millenium_UI
Обзор
Документация
Войти
/
Netrunners
/
Millenium_UI
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/lib/components/common/DragGhost.svelte
30 строк
705 B
Валерий Конюхов
first_commit
08 июл 2025, 22:20
08 июл 2025, 22:20
a4e8dc9
Код
Авторство
О чём код?
<script lang="ts"> import { onDestroy, onMount } from 'svelte'; export let x; export let y; let popupElement = null; onMount(() => { document.body.appendChild(popupElement); document.body.style.overflow = 'hidden'; }); onDestroy(() => { document.body.removeChild(popupElement); document.body.style.overflow = 'unset'; }); </script> <!-- svelte-ignore a11y-click-events-have-key-events --> <!-- svelte-ignore a11y-no-static-element-interactions --> <div bind:this={popupElement} class="fixed top-0 left-0 w-screen h-[100dvh] z-50 touch-none pointer-events-none" > <div class=" absolute text-white z-99999" style="top: {y + 10}px; left: {x + 10}px;"> <slot></slot> </div> </div>