Commit a703e22
committed
(refactor): Wrap upstream signature_pad
- Apparently react-signature-pad (what this repo forked from) just
copy+pasted most of an older version of signature_pad when it was
first created
- In order to get all the latest features, fix bugs, and reduce the
maintenance burden an general surface of this library and its API,
react-signature-canvas is now a React wrapper around signature_pad
- It retains the features it added on top of signature_pad, such as
automatic resizing, a trim feature, and idiomatic React updates
via props
- And now has new features like fromDataURL options, toDataURL,
fromData, and toData! And new props like minDistance and throttle
- Return SignaturePad instance via getSignaturePad
- Use componentDidMount to trigger prop updates via Object.assign on
the SignaturePad instance
- Move all wrapper methods to below render for better organization
- Update README with new props and API methods
- Add links to signature_pad in the props and API sections
- Change intro to reflect the new changes in this library / repo
- Remove bezier.js and point.js as they are wrapped
- Remove all mouse / click / touch handling and other core calculations
that are now wrapped
- Remove defaultProps that were for the signature_pad implementation
- This also once again changes up how the dotSize function works
- It is now back to how it worked pre-v0.2.0
- Still debatable if this is a bugfix or a breaking change
(see v0.2.2)
- Left in propTypes for signature_pad, but maybe those should be
removed too?1 parent 9099197 commit a703e22
File tree
6 files changed
+67
-317
lines changed- src
6 files changed
+67
-317
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
81 | 86 | | |
82 | 87 | | |
83 | 88 | | |
84 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
90 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
91 | 104 | | |
92 | 105 | | |
93 | 106 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
This file was deleted.
0 commit comments