react-canvas-draw
react-canvas-draw copied to clipboard
Question: How can i base points using percentage instead of fixed x and y?
I would like the canvas to be resizable in the sense that if I draw a line in the middle of the canvas, when I resize the canvas, I still want the line to be in the middle.
Is it possible using this library out of the box? If not, how would I go about modifying the code?
This is currently not supported out of the box.
A good start point to add this feature would be the handleCanvasResize callback at https://github.com/embiem/react-canvas-draw/blob/master/src/index.js#L296
@robinodling Did you have any luck with modifying the code? I'm in need of similar solution.
@robinodling Also in need of this, anyone make any traction on this?
Made a rough proof of concept here.

Note that it's just a quick hack at this point, it needs some polish to make it play nice with other props.