refactor(svelte/edges): cleanup types and components

This commit is contained in:
moklick
2023-11-30 12:58:44 +01:00
parent 6825b486ec
commit a70e25b1a2
30 changed files with 640 additions and 233 deletions
@@ -1,8 +1,8 @@
import { memo } from 'react';
import { type Optional, getStraightPath } from '@xyflow/system';
import { getStraightPath } from '@xyflow/system';
import BaseEdge from './BaseEdge';
import type { EdgeProps } from '../../types';
import type { StraightEdgeProps } from '../../types';
function createStraightEdge(params: { isInternal: boolean }) {
// eslint-disable-next-line react/display-name
@@ -23,7 +23,7 @@ function createStraightEdge(params: { isInternal: boolean }) {
markerEnd,
markerStart,
interactionWidth,
}: Optional<EdgeProps, 'id' | 'source' | 'target'>) => {
}: StraightEdgeProps) => {
const [path, labelX, labelY] = getStraightPath({ sourceX, sourceY, targetX, targetY });
const _id = params.isInternal ? undefined : id;