Releases: susielu/react-annotation
Releases · susielu/react-annotation
Fix custom event params after drag
Fix removeEventListener bug
Remove event listener was not being unmounted properly from the drag handlers. This should now be resolved.
Custom JSX Note
You can now pass custom JSX to your note parameter instead of sending a note object:
<Annotation
x={150}
y={170}
dy={117}
dx={162}
connector={{end: "dot"}}
className="new-note"
color={"purple"}
note={<text>My custom note</text>}
/>
You can also pass a function:
note={d => <text fill={d.color}>My custom Note is offset by {d.dx},{d.dy}</text>}
Remove AnnotationCalloutCustom masking
Breaking change for those using AnnotationCalloutCustom
or SubjectCustom
Previously there was logic that would create a custom mask based on the custom annotation and the custom path. This was buggy and has now been removed. If you still want to center your custom annotation and have some radius around it so the connector doesn't intersect, you can pass a radius: 50
for example to create a circular border away from the center of the annotation's connector.
Upgrade prop types to v15.6.2
v1.4.1 1.4.1
Allow for EditableAnnotation to update position from props
Merge this pull request: #18
Allow bgPadding on note
Fix custom type on drag information
Resolves this bug: #10