react-signature-canvas creates issue in styles when I reopens the canvas to edit the signature

Viewed 64

I am saving my signature like this

const data = signatureRef.current
.toDataURL('image/png')

and loads that url while repons the canvas to edit.

1 Answers

I was facing the same issue and solved by using .toData() function. This function returns points array and on re-opening the signature canvas, I loads this array and that worked for me.

const pointArray = signatureRef.current.toData();

And load this as you were loading previously.

Related