Skip to content

Commit

Permalink
feat: better initial state for svg
Browse files Browse the repository at this point in the history
  • Loading branch information
abrgr committed Sep 13, 2023
1 parent 1312317 commit 025727c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/svg-flow-graph/initial-edge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { ArrowMarker } from "../arrow-marker";

export const InitialEdge = ({ pos }: { pos: PositionInfo }) => {
const endPoint = {
x: pos.x - 10,
y: pos.y + 10,
x: pos.x - 7,
y: pos.y + 7,
};

const startPoint = {
x: endPoint.x - 5,
y: endPoint.y - 10,
x: endPoint.x - 3.5,
y: endPoint.y - 7,
};

const markerId = `n${Math.floor(Math.random() * 1000)}`;
Expand All @@ -19,7 +19,7 @@ export const InitialEdge = ({ pos }: { pos: PositionInfo }) => {
<defs>
<ArrowMarker id={markerId} />
</defs>
<circle r="4" cx={startPoint.x} cy={startPoint.y} fill="#000" />
<circle r="3" cx={startPoint.x} cy={startPoint.y} fill="#000" />
<path
d={`M ${startPoint.x},${startPoint.y} Q ${startPoint.x},${endPoint.y} ${
endPoint.x
Expand Down

0 comments on commit 025727c

Please sign in to comment.