added onchange handler

This commit is contained in:
apoorv taneja
2024-02-02 20:46:54 +05:30
parent d5b3df1648
commit c970abc871

View File

@ -134,7 +134,6 @@ export const SignaturePad = ({
}); });
onChange?.($el.current.toDataURL()); onChange?.($el.current.toDataURL());
ctx.save(); ctx.save();
} }
} }
@ -193,6 +192,7 @@ export const SignaturePad = ({
const pathData = new Path2D(getSvgPathFromStroke(getStroke(line, perfectFreehandOptions))); const pathData = new Path2D(getSvgPathFromStroke(getStroke(line, perfectFreehandOptions)));
ctx?.fill(pathData); ctx?.fill(pathData);
}); });
onChange?.($el.current.toDataURL());
} }
}; };