Closed BlerasKRT closed 4 years ago
background default is white, you can change props of WebStyle,
webStyle={`.m-signature-pad--body
canvas {
background-color: red;
}`
}
Thank you for the quick response, It works to change the background color of where you paint, but I need that the final image have a diferent background color, not just black... basically I just change the value of this: at signature_pad.js in function SignaturePad:
this.backgroundColor = options.backgroundColor || 'rgba(0,0,0,0)'; should be 'rgb(255,255,255)'
Thank you in advance.
@BlerasKRT ,v3.1.0 has release, add penColor and backgroundColor props.
Sorry but it does not work in any way...
<Signature // handle when you click save button onOK={(img) => { console.log("img", img); props.setTestDrop(img); }} onEmpty={() => { console.log("empty"); setTestType("empty"); }} // description text for signature descriptionText="Firma" // clear button text clearText="Borrar" // save button text confirmText="Salvar"
webStyle={`.m-signature-pad--footer
.button {
background-color: rgba(255,117,2,1);
color: #FFF;
}`}
autoClear={true}
imageType={"image/jpeg"}
backgroundColor="rgb(255,255,255)"
penColor={"rgba(255,117,2,1)"}
/>
Oh, work fine on ios.
yes working fine in both
I need to save the picture and I want to have a background pure white. I see that you can changeit in the signature pad where this is based. Any alternative diferent of change directly signature pad code?