Skip to content

Commit 2411c73

Browse files
committed
.
1 parent 8f46396 commit 2411c73

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,8 @@ const headShapeArrow1 = {svgElem: <path d="M 0 0 L 1 0.5 L 0 1 L 0.25 0.5 z"/>,
593593
`offsetForward` - how much to offset tht line into the svg element(from 0 to 1). normally the line will connect to the
594594
start of the svgElem. for example in case of the default arrow you want the line to enter 25% into the svgElem.
595595

596+
[here's](https://codesandbox.io/s/react-xarrows-custom-svgs-dfgsf?file=/src/App.tsx) a custom example using custom svg files.
597+
596598
don't forget about `arrowHeadProps` and `arrowTailProps` in case you want to use default shape but custom svg props.
597599

598600
**in case you pass a custom svg element:** currently you have to adjust the path to start from 0,0 and to be at size box

examples/src/stories/XarrowTasks.stories.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,3 @@ export const ManyArrows = () => {
8282
</div>
8383
);
8484
};
85-
86-
export const BretSVG = () => {
87-
const box = { id: 'box1', initialOffset: { x: 20, y: 20 }, reference: useRef(null) };
88-
const box2 = { id: 'box2', initialOffset: { x: 320, y: 120 }, reference: useRef(null) };
89-
90-
return (
91-
<div style={_canvasStyle} id="canvas">
92-
<Xwrapper>
93-
<DraggableBox {...box} />
94-
<DraggableBox {...box2} />
95-
<Xarrow start={box.reference} end={box2.reference} path={'grid'} />
96-
</Xwrapper>
97-
</div>
98-
);
99-
};

0 commit comments

Comments
 (0)