YanYuanFE / react-native-signature-canvas

:black_nib: React Native Signature Component based WebView Canvas for Android && IOS && expo
MIT License
417 stars 149 forks source link

Not able to make vertical lines or full signature but horizontal lines are working fine #319

Closed Akshaybagai52 closed 1 year ago

Akshaybagai52 commented 1 year ago

import React, { useRef } from 'react'; import { View, StyleSheet, Button } from 'react-native'; import SignatureCanvas, { SignatureViewRef } from 'react-native-signature-canvas';

export const MySignatureCanvas: React.FC = () => { const signatureRef = useRef(null); // Create a ref for the signature canvas

const handleClearSignature = () => { signatureRef.current?.clearSignature(); };

const handleGetSignature = () => { const signatureData = signatureRef.current?.getData(); console.log(signatureData); };

return (

Akshaybagai52 commented 1 year ago

Above one is full code for signature screen whenever i'm drawing vertical line then i'm getting dots on screen but whenever i'm drawing horizontal lines then it is working fine is there any issue ?

https://github.com/YanYuanFE/react-native-signature-canvas/assets/100753870/add00940-ef5b-41a3-b570-b9511ee23382

YanYuanFE commented 1 year ago

you can use scrollEnabled props in the ScrollView, when onBegin triggered you can set scrollEnabled with false, when onEnd triggered you can set scrollEnabled with true same with https://github.com/YanYuanFE/react-native-signature-canvas/issues/11#issuecomment-643923851