cropperjs icon indicating copy to clipboard operation
cropperjs copied to clipboard

Cropbox outline not aligned with the image cropped

Open stevegnr opened this issue 1 year ago • 3 comments

Describe the bug When cropping, the cropbox outline is not aligned with the image cropped, on the right side : image

To Reproduce Steps to reproduce the behavior:

  1. The error is visible everytime I want to crop

Additional context I got a unusual ratio : 1052/1871, but the problem occurs even in a "common" format like 16/9

<Cropper
        ref={cropperRef}
        style={{ maxHeight: "35vh", width: "100%" }}
        aspectRatio={targetWidth / targetHeight}
        src={src}
        viewMode={1}
        background={false}
        responsive={true}
        autoCropArea={1}
        checkOrientation={false}
        zoomable={false}
      />

stevegnr avatar Nov 03 '23 14:11 stevegnr

metoo

mxy8319 avatar Nov 14 '23 10:11 mxy8319

i deal it with this .cropper-view-box { outline: 0px solid #E6E6E6; } .cropper-crop-box .cropper-line.line-e { right: -1px; width: 1px; } .cropper-crop-box .cropper-line.line-n { height: 1px; top: -1px; } .cropper-crop-box .cropper-line.line-w { left: -1px; width: 1px; } .cropper-crop-box .cropper-line.line-s { bottom: -1px; height: 1px; } .cropper-line { opacity: 1; }

mxy8319 avatar Nov 14 '23 10:11 mxy8319

@stevegnr Was your problem solved?

fengyuanchen avatar Aug 18 '24 08:08 fengyuanchen