forked from rpmsoftware/react-native-signature-pad
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cavans appears blank on some Android devices and unable to replicate.
Have added ability to send back Canvas width and Height in order to try and diagnose.
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29806d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avioli/react-native-signature-pad@7b0774a
Might help! However, @avioli's repo now has an issue where the android doesn't actually draw, but only renders taps.
Very interesting indeed!
29806d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zanchee i could not replicate the issue when in development mode, however, as soon as a switched to production, i found that the size of the canvas was null, null.
I'm not sure why it does this, however in order to fix the issue, you have to pass the height and width of the canvas.
As my signature canvas is not the full size of the screen, i had to get the size of the View containing the SignaturePad:
29806d7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avioli's detective work decided that the reason it was null null, was due to a race condition in which the post message is just a little slow. That means that the pad renders before it gets its size. Resulting in null null.
I've been constantly bouncing between your two forks! hah!
I was wondering if there was a way to disable the rendering of a name in your fork? If I don't pass a name as a prop, the component still tries to access the name prop. Just a little bug I discovered earlier today.