embiem / react-canvas-draw

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

Using saveData without animation #69

Closed foucdeg closed 4 years ago

foucdeg commented 4 years ago

I'm trying to rerender a previous drawing using the saveData prop.

Using this prop it seems that the drawing has to be animated, whereas the loadSaveData() accepts a second argument to disable animation.

Is there any way to disable drawing animation when using the saveData prop ?

alexfruehwirth commented 4 years ago

@foucdeg set loadTimeOffset={0} as a prop. This should solve your issue!

salehy1981 commented 4 years ago
    immediateLoading={true}
embiem commented 4 years ago

Thanks! Both above mentioned solutions should work.

This is definitely an API that would need some rethinking for a v2, as it is not very clear how to achieve it, and it's actually achievable using these two mentioned methods. So, thanks for asking the question!

Closing for now, please let me know if you have any further issues with this.