Closed cerven closed 2 years ago
You are right that this is a weird situation, I can re-export that function, but what I had in mind was a bit more user friendly - simply not caring about the SVG path creation.
I will work a bit on the code to make it so that the path is not required for the initialValues
.
Even #35 fixes mentioned issue, still will be good to reexport this function, it can be sometimes handy. (in my app I need it again in another usecase).
Actually I need to generate SVG from points(as preview) without rendering "Draw".
My options are:
Ok sounds good, I will re-export it
This is now available in version 0.5.0
:tada:
I am saving just coordinates of draw. When I want to show original drawing(pass
initialValues.paths
), it is not possible just passing there coordinates(and color, thickness,...), it is required pass alsopath
as SVG string. This SVG string is internally generated when drawing by function in utilscreateSVGPath
.It would be good to reexport this function so it can be used for generating SVG path, or add method for generate drawing just from coordinates without SVG path variable(call createSVGPath internally).
Now I am importing this function directly with
import { createSVGPath } from "../node_modules/@benjeau/react-native-draw/src/utils";
which is not ideal