Skip to content

Releases: susielu/react-annotation

Fix custom event params after drag

26 Jan 20:21
Compare
Choose a tag to compare

Fixes: Event handler callback switched parameter after dragging #22

Fix removeEventListener bug

21 Dec 18:14
Compare
Choose a tag to compare

Remove event listener was not being unmounted properly from the drag handlers. This should now be resolved.

Custom JSX Note

21 Dec 18:19
Compare
Choose a tag to compare

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

17 Dec 18:49
Compare
Choose a tag to compare

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

17 Oct 22:41
Compare
Choose a tag to compare

Allow for EditableAnnotation to update position from props

25 Sep 16:00
Compare
Choose a tag to compare

Allow bgPadding on note

28 Jun 23:56
Compare
Choose a tag to compare

You can pass this in the note as either a number or an object with one or more top, bottom, left, or right properties.

screen shot 2018-06-28 at 4 40 39 pm

Fix custom type on drag information

31 Mar 18:57
Compare
Choose a tag to compare