Closed vikasacharya16 closed 2 years ago
I just got the answer, Since this library lacks proper documentation I'm not deleting this question.
change, ref={handleCanvas}
to ref={(e) => handleCanvas(e, xAxis, yAxis)}
and, handleCanvas = (canvas)
to handleCanvas = (canvas, x, y)
lastly add,
canvas.width = 350;
canvas.height = 500;
The black border is the whole canvas area
the working example is here Canvas Basic Snack