Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Proptypes errors #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HarshitMadhav
Copy link

Proptypes are no longer imported from React they are imported from prop-types library.
So fix this. I did something fix like this
6eaf9cc

Greg Hogan and others added 3 commits October 25, 2016 09:23
Most of the time my Android devices show a blank image for the signature
page, and do not render any brush strokes. This appears to have been a
bug that was fixed in the latest version of signature_pad, so I upgraded
the injected Javascript to be 1.5.3. My android and iOS devices both now
work with 1.5.3.

The changes I made were:
1. Copy/Paste the code from
https://github.com/szimek/signature_pad/blob/v1.5.3/signature_pad.js
into the 'content' var in signaturePad.js
2. Replace 4 spaces with 2 spaces (following your convention)
3. Replace all // comments with /* */
4. Copy/Paste the comment at the top of the file
Signatures on Android occasionally fail due to document.body.clientWidth
and window.innerWidth (as well as document.body.clientHeight and
window.innerHeight) being 0 on initialization.

I attempted to fix this by adding a setTimeout with a 300ms delay, but
even that was not a 100% effective fix. This issue is most likely
related to:
http://tripleodeon.com/2011/12/first-understand-your-screen/
http://stackoverflow.com/questions/10610743/android-browsers-screen-width-screen-height-window-innerwidth-window-inner

Note that I attempted to apply the ReactNative measured dimensions
instead of using document.body.clientWidth, but that broke iOS.

This fix will not address any rendering issues related to rotating,
since we would need to register a callback and re-initialize the canvas
element on rotation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant