-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image is not viewed in full size based on the crop #56
Comments
+1 on this request! |
@TahaKhanAbdalli, I'm sorry, but I assume, that I didn't understand your issue completely. I think that you want to set the different default coordinates of the cropped area, and it's possible. |
@TahaKhanAbdalli, @roscoej, any news? |
Hi, you need set default-coordinates with function type, the demo code as follow (cropping area defaults to the entire image area): const defaultCropCoordinates = (
state: CropperState
settings: CoreSettings
) => {
return {
left: 0,
top: 0,
width: state.imageSize.width,
height: state.imageSize.height
}
}
<Cropper
ref={refCropper}
className="cropper"
src={fileUrl}
defaultCoordinates={defaultCropCoordinates}
onChange={handleCropChange}
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We've noticed a default behavior in the React Advanced Cropper library that seems to be part of how the library works.
The observed behavior is that upon uploading an image, the library automatically selects the center of the image with a specific width and height for the crop.
This behavior becomes more apparent when we upload an image and crop it. When we reopen the cropped image in the cropper, it consistently displays the image with a zoom, highlighting the crop area's outline. Unfortunately, it seems like this behavior is built into the library, and currently, we don't have the ability to change it. Any insights or guidance you can provide on this matter would be appreciated.
The text was updated successfully, but these errors were encountered: