terrylinla / react-native-sketch-canvas

A React Native component for drawing by touching on both iOS and Android.
MIT License
697 stars 454 forks source link

Argument 4 (BOOL) of RNSketchCanvasManager.save must not be null #71

Open nkscoder opened 6 years ago

nkscoder commented 6 years ago

on save canvas savePreference={() => { return { folder: "CACHES", filename: 'image'+Math.ceil(Math.random() * 100000000), transparent: false, imageType: "png", includeImage:true } }} onSketchSaved={(success, path) => { Alert.alert(success ? 'Image saved!' : 'Failed to save image!', path) }} onPathsChange={(pathsCount) => { console.log('pathsCount', pathsCount) }} "@terrylinla/react-native-sketch-canvas": "^0.8.0", "eslint": "^3.19.0", "react": "16.3.1", "react-native": "~0.55.2",

toryshadow commented 5 years ago

+1 same issue trying to call this.canvasElement.save()

"@terrylinla/react-native-sketch-canvas": "~0.8.0", "react": "16.6.3", "react-native": "0.58.5",

does anyone know solution?

UPD: just added arguments to functions get it work this.canvasElement.save('png', false, 'RNSketchCanvas', String(Math.ceil(Math.random() * 100000000)), false, false, false);

yestay90 commented 4 years ago

@toryshadow The documentation is written poorly. Have you solved how to save sketch with localImage on background?