We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e732d3 commit 854d52eCopy full SHA for 854d52e
client/web/src/components/modals/ImageCropper.tsx
@@ -97,9 +97,9 @@ function getCroppedImg(
97
canvas.height = scale * crop.height;
98
99
// translate canvas context to a central location on image to allow rotating around the center.
100
- ctx.translate(canvas.width / 2, canvas.width / 2);
+ ctx.translate(canvas.width / 2, canvas.height / 2);
101
ctx.rotate(getRadianAngle(rotation));
102
- ctx.translate(-canvas.width / 2, -canvas.width / 2);
+ ctx.translate(-canvas.width / 2, -canvas.height / 2);
103
104
// draw rotated image and store data.
105
ctx.drawImage(
0 commit comments