Releases: pierpo/react-archer
Releases Β· pierpo/react-archer
Release 3.2.2
Fixes
- Add support for react 17 types #149 (thanks @bluemelodybox)
Release 3.2.1
Fixes
- Add missing typescript definition:
noCurves
property forArcherContainer
was missing
Release 3.2.0
Features
- You can now disable the end marker of the arrows, thanks @ThiloAschebrock! (#139)
Release 3.1.0
Release 3.0.0
New features
- You can now use circles as arrow ends! Many thanks to @damonbauer for his amazing contribution! #111
pointer-events
are now set tonone
as default so that you can click through the SVG containers. Thank you @viztor! #107
Breaking changes
- If you've been using the default
pointer-events
value in yourArcherContainer
s, you may want to put back the previous default value:
<ArcherContainer
+ svgContainerStyle={{ pointerEvents: 'auto' }}
>
{/* stuff */}
</ArcherContainer>
- The arrow end styling API has changed. You should update them to fit the new API π
<ArcherElement
id="root"
relations={[
{
...
style: {
strokeDasharray: "5,5",
- arrowLength: 10,
- arrowThickness: 20
+ endShape: {
+ arrow: {
+ arrowLength: 10,
+ arrowThickness: 20
+ }
}
}
}
]}
>
<div style={boxStyle}>Root</div>
</ArcherElement>;
v2.0.2
Release 2.0.1
Typescript
- Updated types
Release 2.0.0
Breaking changes
No more multiple children to ArcherElement
You can no longer use multiple children elements for ArcherElement
.
- If you really need multiple children, then you need to wrap them in a
<div />
. It used to be done like this internally but this was causing drawing issues, so now to achieve the same as before you should now wrap your elements yourself.
If your layout broke, try the following. We used to add an artificial div
internally with ArcherElement
, which has been removed. A quick fix is to add back the div
yourself:
<ArcherElement>
- <Content />
+ <div>
+ <Content />
+ </div>
</ArcherElement>
No more custom components as direct children of ArcherElement
without tweaking
- You can no longer use custom components as a direct child of ArcherElement out of the box. Two fixes possible:
- wrap it in a div, as mentioned above. Ok if it doesn't break your layout.
- forward the reference of your component to the DOM element in your component that will act as a drawing reference. See below:
- const MyComponent = (props) => {
+ const MyComponent = React.forwardRef((props, ref) => {
return (
- <div>
+ <div ref={ref}>
<span>fixed</span>
</div>
);
- };
+ });
// ...
<ArcherElement><MyComponent /></ArcherElement>
Bugfixes
- Solved an issue with arrows not drawing to the proper element #93
- This was probably the root of many problems. If you had problems with arrows not drawing properly, try this new release π
Release 1.6.0
Renamed to release 2.0.0.
Release 1.5.1
Bugfixes
- Fix
Failed to execute 'unobserve' on 'ResizeObserver'
error (#84) - Fix
arrowLength
not working properly when value is0