Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
react-native-android-signaturepad
Advanced tools
Integrate https://github.com/gcacace/android-signaturepad into `react-native/android`
Integrate https://github.com/gcacace/android-signaturepad into react-native/android
npm i react-native-android-signaturepad
import React from 'react'
import {Button,View} from 'react-native'
import SignaturePad from 'react-native-android-signaturepad'
export default class extends React.Component {
state={
erasing:false
};
clear=()=>{
this.refs._signaturePad.clear();
};
undo=()=>{
this.refs._signaturePad.undo(callback:options);
};
render(){
return (
<View style={{flex:1}}>
<SignaturePad
ref={"_signaturePad"}
style={{flex:1,backgroundColor:'yellow'}}
penMaxWidth={7}
penMinWidth={3}
undo={true}
bitmap={"base64"}
erasing={this.state.erasing}
onChange={(event)=>{
let message = event.nativeEvent.message;
console.log(message)
}}
/>
<Button title={"clear"} onPress={this.clear}/>
<Button title={"undo"} onPress={this.undo}/>
</View>
)
}
}
https://github.com/gcacace/android-signaturepad
1.0.4
1.添加 erasing={boolean}
橡皮擦功能
2.1.0
1.添加undo()
回退功能
2.添加undo
props控制回退功能的启用(默认为true,可能会占用一定内存)
2.2.1
1.添加bitmap={string}
初始化时会渲染传入的bitmap
Future
1.Add BackgroundImage support
使用<Image />
渲染bitmap记得添加前缀'data:image/png;base64,'
以作为base64
格式数据
this.setState({bitmap:await this.refs._signaturePad.getTransparentSignatureBitmap()})
<Image source={{uri:'data:image/png;base64,'+bitmap}}
FAQs
Integrate https://github.com/gcacace/android-signaturepad into `react-native/android`
The npm package react-native-android-signaturepad receives a total of 28 weekly downloads. As such, react-native-android-signaturepad popularity was classified as not popular.
We found that react-native-android-signaturepad demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.