Run `tsc`
authorCyperghost <olaf_schmitz_1@t-online.de>
Thu, 5 Dec 2024 10:48:58 +0000 (11:48 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Thu, 5 Dec 2024 10:48:58 +0000 (11:48 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Cropper.js

index 86794834c6095e9370e35bf3e77aa4ab5c1880cf..7c87962d7e70e8c7c8598c11f5039cc3ee9c4eab 100644 (file)
@@ -135,10 +135,10 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Image/Resizer", "WoltL
                 const selection = event.detail;
                 const cropperImageRect = this.cropperImage.getBoundingClientRect();
                 const maxSelection = {
-                    x: cropperImageRect.left - cropperCanvasRect.left,
-                    y: cropperImageRect.top - cropperCanvasRect.top,
-                    width: cropperImageRect.width,
-                    height: cropperImageRect.height,
+                    x: Math.round(cropperImageRect.left - cropperCanvasRect.left),
+                    y: Math.round(cropperImageRect.top - cropperCanvasRect.top),
+                    width: Math.round(cropperImageRect.width),
+                    height: Math.round(cropperImageRect.height),
                 };
                 if (!inSelection(selection, maxSelection)) {
                     event.preventDefault();