Answer the question
In order to leave comments, you need to log in
How to add canvas dimensions to an image in a child component?
I'm trying to compare img and canvas images in a child component. In the parent only the inputs in which I get the image, then after receiving the image I create an img and pass it through the prop to the child component, and in the child component I already try to add the image to the canvas by setting its dimensions, but for some reason the canvas crops the image, in which could be the reason?
Judging by the console, all sizes are normal, but for some reason I don’t see the added sizes in html.
Link to codesandbox
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question