agilgur5 / react-signature-canvas

A React wrapper component around signature_pad (in < 150 LoC). Unopinionated and heavily updated fork of react-signature-pad
https://agilgur5.github.io/react-signature-canvas/
Other
528 stars 115 forks source link

How to change the position of an inserted picture? #60

Closed TomatoesMan closed 2 years ago

TomatoesMan commented 3 years ago

How to change the position of the inserted picture?

agilgur5 commented 2 years ago

background picture? Try CSS background-image

I'm not sure what is meant by "inserted picture"? Pictures/photos aren't meant to be used with this component. If you are trying to use a picture as a background for the signature, I might suggest using the CSS background-image property instead.

fromDataURL? Upstream limitation

Did you mean a data URL inserted by fromDataURL? If so, there is unfortunately no way to add an offset to the dataURL due to an upstream limitation in signature_pad. On this line upstream, the offsets are hard-coded to 0 unfortunately.

That being said, https://github.com/szimek/signature_pad/pull/538 added support for offsets and was recently released with v4.0.0. So once we upgrade to v4.0.0, it will be possible to add offsets to fromDataURL's options parameter, if that's what you were looking for.

agilgur5 commented 2 years ago

Closing as stale