terrylinla / react-native-sketch-canvas

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

Feature Request: add the complete output of `sketchCanvas.getPaths()` to the canvas at once #104

Open toblerpwn opened 5 years ago

toblerpwn commented 5 years ago

This may or may not be more efficient than just looping .forEach() over the Array<Path> objects (it would probably save a little bit of noise for paths that have MANY MANY strokes), but also it just saves a lot of boilerplate code written in a lot of other code bases. :P

The use case is e.g. saving the getPaths() output to a server and downloading it on a new device via some new function addPaths(Array<Path>) in addition to addPath(Path).

May be related to #65, though that issue appears to have other things going on so let's not conflate the two.

ShaMan123 commented 5 years ago

I'm looking into it. My guess this might enhance performance, as currently sending multiple commands over the bridge causes my app to crash. see my PR #99, it is WIP => this feature is for now supported by android alone and will cause ios to crash