Merge pull request #3723 from xyflow/viewport-portal

Added seperate portal to put dom elements inside the flow
This commit is contained in:
Moritz Klack
2023-12-19 13:16:53 +01:00
committed by GitHub
8 changed files with 44 additions and 1 deletions
@@ -0,0 +1,12 @@
<script lang="ts">
import portal from '$lib/actions/portal';
import { useStore } from '$lib/store';
type $$Props = {};
const { domNode } = useStore();
</script>
<div use:portal={{ target: '.svelte-flow__viewport-portal', domNode: $domNode }}>
<slot />
</div>
@@ -0,0 +1 @@
export { default as ViewportPortal } from './ViewportPortal.svelte';