react-easy-crop icon indicating copy to clipboard operation
react-easy-crop copied to clipboard

Vertical reposition shows blank screen "react-easy-crop": "5.0.7",

Open PDipendra opened this issue 1 year ago • 1 comments

Initially its good Screenshot 2024-07-18 at 19 27 14

But when i move vertically it shows Screenshot 2024-07-18 at 19 28 39

const [crop, setCrop] = useState({ x: 0, y: 0 }) const [zoom, setZoom] = useState(1);

return ( <div className={styles.container}> <div className={styles.cropperWrapper}> <Cropper image={'https://images.pexels.com/photos/19176962/pexels-photo-19176962/free-photo-of-passenger-train-in-blurred-motion.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'} crop={crop} zoom={zoom} aspect={3 / 1} onCropChange={setCrop} onZoomChange={setZoom} classes={{ cropAreaClassName: styles.cropperArea }} objectFit="horizontal-cover" restrictPosition={true} /> );

.container { position: relative; background-color: lavender; max-height: 90vh; min-height: 90vh; width: 900px; margin: 5rem auto 0;

.cropperWrapper {
    background-color: rgb(13, 173, 96);
    height: 300px;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    .cropperArea {
        width: 100% !important;
        height: 100% !important;
    }
}

}

PDipendra avatar Jul 18 '24 13:07 PDipendra

Why do you override the internal CSS classes?

ValentinH avatar Jul 18 '24 14:07 ValentinH