chore(examples): cleanup

This commit is contained in:
moklick
2024-04-16 10:55:22 +02:00
parent e40386b93f
commit 53ea72e85b
2 changed files with 3 additions and 11 deletions

View File

@@ -12,8 +12,8 @@
const { getIntersectingNodes } = useSvelteFlow();
function onNodeDrag({ detail: { node } }) {
const intersections = getIntersectingNodes(node).map((n) => n.id);
function onNodeDrag({ detail: { targetNode } }) {
const intersections = getIntersectingNodes(targetNode).map((n) => n.id);
$nodes.forEach((n) => {
n.class = intersections.includes(n.id) ? 'highlight' : '';

View File

@@ -1,14 +1,6 @@
<script lang="ts">
import { writable } from 'svelte/store';
import {
SvelteFlow,
Controls,
Background,
MiniMap,
type Node,
type Edge,
type NodeTypes
} from '@xyflow/svelte';
import { SvelteFlow, Controls, Background, MiniMap, type Node, type Edge } from '@xyflow/svelte';
import '@xyflow/svelte/dist/style.css';