Skip to content

Releases: Bowen7/react-rough-fiber

0.0.5

03 May 07:47
ae27e2c
Compare
Choose a tag to compare

Return a more suitable ref

Previously, the ref will always return an SVGGElement when the element's type is one of path, circle, line, rect, ellipse, polygon, polyline. Because we wrap these types of elements in an SVGGElement and return the SVGGElement as the ref.

https://github.com/Bowen7/react-rough-fiber/blob/70f91aa7588ec8375dd53225d8ca74445a716f72/packages/react-rough-fiber/src/renderer.ts#L26-L32

Now, I have changed it to return the first path element of the SVGGElement.

It's just a better, not a perfect way to handle the ref. Because roughjs renders all shapes to SVGPathElement, we can't get the original ref.

0.0.4

21 Apr 09:59
Compare
Choose a tag to compare

Add README.md

0.0.3

21 Apr 09:31
05f89df
Compare
Choose a tag to compare
  • Set the default fixedDecimalPlaceDigits to 3.
  • Support function type options
  • Fix the circle and ellipse radius

0.0.2

07 Apr 18:23
Compare
Choose a tag to compare