embiem / react-canvas-draw

React Component for drawing in canvas
https://embiem.github.io/react-canvas-draw/
MIT License
902 stars 315 forks source link

Question: Do you interested in adding fast load/redraw functionality? #103

Closed a-liashenko closed 3 years ago

a-liashenko commented 3 years ago

I need to change the color/radius for already drawn lines on the fly. For now, the getSaveData/loadSavedData functionality extremely slow. Mostly because it requires to draw each line on the tmp ctx and copy it to the drawing ctx. If you have 10+ lines (even with 3 points only) it will have a noticeable lag.

I've added a new method to redraw all lines with different colors/radius. So if you someone interested I'll be glad to open a PR.

embiem commented 3 years ago

I'm currently cleaning up this repo. Would be happy to review your PR if you still want to submit one.