react-native-signature-canvas 4.7.1 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -50,45 +50,47 @@ import SignatureScreen from 'react-native-signature-canvas';
50
50
 
51
51
  ---
52
52
 
53
- | Prop | Type | Description |
54
- |:------------------------------------|:----------------------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------|
55
- | androidHardwareAccelerationDisabled | `boolean` | androidHardwareAccelerationDisabled for react-native-webview. Default is false |
56
- | autoClear | `boolean` | should auto clear the signature after clicking the Confirm button |
57
- | backgroundColor | `string` | default is "rgba(255,255,255,0)" (_transparent_), background color of the canvas |
58
- | bgHeight | `number` | height of the background image |
59
- | bgWidth | `number` | width of the background image |
60
- | bgSrc | `string` | background image source uri (_url_) |
61
- | clearText | `string` | clear button text |
62
- | confirmText | `string` | save button text |
63
- | customHtml | `(injectedJavaScript: string) => string` | html string that lets you modify things like the layout or elements |
64
- | dataURL | `string` | default is "", Base64 string, draws saved signature from dataURL. |
65
- | descriptionText | `string` | description text for signature |
66
- | dotSize | `number` | radius of a single dot _(not stroke width)_ |
67
- | imageType | `string` | "image/png" (_default_), "image/jpeg"、"image/svg+xml", imageType of exported signature |
68
- | minWidth | `number` | minimum width of a line. Defaults to 0.5 |
69
- | maxWidth | `number` | maximum width of a line. Defaults to 2.5 |
70
- | onOK | `function` | callback function after saving non-empty signature |
71
- | onEmpty | `function` | callback function after trying to save an empty signature |
72
- | onClear | `function` | callback function after clearing the signature |
73
- | onGetData | `function` | callback function when getData() is called
74
- | onBegin | `function` | callback function when a new stroke is started |
75
- | onEnd | `function` | callback function when the stroke has ended |
76
- | onLoadEnd | `function` | callback function when the webview canvas load ended |
77
- | onUndo | `function` | callback function when undo() is called |
78
- | onRedo | `function` | callback function when redo() is called |
79
- | onDraw | `function` | callback function when drawing is enabled |
80
- | onErase | `function` | callback function when erasing is enabled |
81
- | onChangePenColor | `function` | callback function after changing the pen color |
82
- | onChangePenSize | `function` | callback function after changing the pen size
83
- | overlayHeight | `number` | height of the overlay image |
84
- | overlayWidth | `number` | width of the overlay image |
85
- | overlaySrc | `string` | overlay image source uri (url) _must be .png with a transparent background_
86
- | penColor | `string` | default is "black", color of pen |
87
- | rotated | `boolean` | rotate signature pad 90 degrees |
88
- | style | `object` | style of wrapper view |
89
- | trimWhitespace | `boolean` | trim image whitespace |
53
+ | Prop | Type | Description |
54
+ |:------------------------------------|:----------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------|
55
+ | androidHardwareAccelerationDisabled | `boolean` | androidHardwareAccelerationDisabled for react-native-webview. Default is false |
56
+ | autoClear | `boolean` | should auto clear the signature after clicking the Confirm button |
57
+ | backgroundColor | `string` | default is "rgba(255,255,255,0)" (_transparent_), background color of the canvas |
58
+ | bgHeight | `number` | height of the background image |
59
+ | bgWidth | `number` | width of the background image |
60
+ | bgSrc | `string` | background image source uri (_url_) |
61
+ | clearText | `string` | clear button text |
62
+ | confirmText | `string` | save button text |
63
+ | customHtml | `(injectedJavaScript: string) => string` | html string that lets you modify things like the layout or elements |
64
+ | dataURL | `string` | default is "", Base64 string, draws saved signature from dataURL. |
65
+ | descriptionText | `string` | description text for signature |
66
+ | dotSize | `number` | radius of a single dot _(not stroke width)_ |
67
+ | imageType | `string` | "image/png" (_default_), "image/jpeg"、"image/svg+xml", imageType of exported signature |
68
+ | minWidth | `number` | minimum width of a line. Defaults to 0.5 |
69
+ | maxWidth | `number` | maximum width of a line. Defaults to 2.5 |
70
+ | nestedScrollEnabled | `boolean` | enable nested scrolling for use inside of a scrollview |
71
+ | showsVerticalScrollIndicator | `boolean` | Boolean value that determines whether a vertical scroll indicator is shown in the `WebView`, The default value is `true`. |
72
+ | onOK | `function` | callback function after saving non-empty signature |
73
+ | onEmpty | `function` | callback function after trying to save an empty signature |
74
+ | onClear | `function` | callback function after clearing the signature |
75
+ | onGetData | `function` | callback function when getData() is called
76
+ | onBegin | `function` | callback function when a new stroke is started |
77
+ | onEnd | `function` | callback function when the stroke has ended |
78
+ | onLoadEnd | `function` | callback function when the webview canvas load ended |
79
+ | onUndo | `function` | callback function when undo() is called |
80
+ | onRedo | `function` | callback function when redo() is called |
81
+ | onDraw | `function` | callback function when drawing is enabled |
82
+ | onErase | `function` | callback function when erasing is enabled |
83
+ | onChangePenColor | `function` | callback function after changing the pen color |
84
+ | onChangePenSize | `function` | callback function after changing the pen size
85
+ | overlayHeight | `number` | height of the overlay image |
86
+ | overlayWidth | `number` | width of the overlay image |
87
+ | overlaySrc | `string` | overlay image source uri (url) _must be .png with a transparent background_
88
+ | penColor | `string` | default is "black", color of pen |
89
+ | rotated | `boolean` | rotate signature pad 90 degrees |
90
+ | style | `object` | style of wrapper view |
91
+ | trimWhitespace | `boolean` | trim image whitespace |
90
92
  | webStyle | `string` | webview style for overwrite default style, all style: https://github.com/YanYuanFE/react-native-signature-canvas/blob/master/h5/css/signature-pad.css |
91
- | androidLayerType | `none、software、hardware` | Sets the android webview layerType |
93
+ | androidLayerType | `none、software、hardware` | Sets the android webview layerType |
92
94
 
93
95
  ## Methods
94
96
 
package/index.d.ts CHANGED
@@ -24,6 +24,8 @@ declare module "react-native-signature-canvas" {
24
24
  imageType?: ImageType;
25
25
  minWidth?: number;
26
26
  maxWidth?: number;
27
+ nestedScrollEnabled?: boolean;
28
+ showsVerticalScrollIndicator?: boolean;
27
29
  onOK?: (signature: string) => void;
28
30
  onEmpty?: () => void;
29
31
  onClear?: () => void;
package/index.js CHANGED
@@ -49,6 +49,8 @@ const SignatureView = forwardRef(
49
49
  imageType = "",
50
50
  minWidth = 0.5,
51
51
  maxWidth = 2.5,
52
+ nestedScrollEnabled = false,
53
+ showsVerticalScrollIndicator= true,
52
54
  onOK = () => {},
53
55
  onEmpty = () => {},
54
56
  onClear = () => {},
@@ -277,6 +279,8 @@ const SignatureView = forwardRef(
277
279
  javaScriptEnabled={true}
278
280
  onError={renderError}
279
281
  onLoadEnd={handleLoadEnd}
282
+ nestedScrollEnabled={nestedScrollEnabled}
283
+ showsVerticalScrollIndicator={showsVerticalScrollIndicator}
280
284
  />
281
285
  {loading && (
282
286
  <View style={styles.loadingOverlayContainer}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-signature-canvas",
3
- "version": "4.7.1",
3
+ "version": "4.7.2",
4
4
  "description": "React Native Signature Component based Canvas for Android && IOS && expo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tea.yaml ADDED
@@ -0,0 +1,6 @@
1
+ # https://tea.xyz/what-is-this-file
2
+ ---
3
+ version: 1.0.0
4
+ codeOwners:
5
+ - '0x5975b662fb1ba6BFEA65aae6eD781a24Ba8CAAc4'
6
+ quorum: 1