Skip to content

Commit 552d037

Browse files
committed
Round the numbers
1 parent b140a08 commit 552d037

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ts/WoltLabSuite/Core/Component/Image/Cropper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ abstract class ImageCropper {
173173

174174
const cropperImageRect = this.cropperImage!.getBoundingClientRect();
175175
const maxSelection: Selection = {
176-
x: cropperImageRect.left - cropperCanvasRect.left,
177-
y: cropperImageRect.top - cropperCanvasRect.top,
178-
width: cropperImageRect.width,
179-
height: cropperImageRect.height,
176+
x: Math.round(cropperImageRect.left - cropperCanvasRect.left),
177+
y: Math.round(cropperImageRect.top - cropperCanvasRect.top),
178+
width: Math.round(cropperImageRect.width),
179+
height: Math.round(cropperImageRect.height),
180180
};
181181

182182
if (!inSelection(selection, maxSelection)) {

0 commit comments

Comments
 (0)