antd-img-crop
antd-img-crop copied to clipboard
open crop modal with defaultFileList props
Hi,
is it possible to open a modal for cropping automatically if only one file is defined in defaultFileList?
<ImgCrop aspect={aspect}>
<Upload.Dragger
accept={accept}
defaultFileList={[{
uid: 'foo1',
name: 'foo1.png',
status: 'done',
url: 'https://example.com/image.png',
thumbUrl: 'https://example.com/image.png',
}]}
>
Click/Drag to upload
</Upload.Dragger>
</ImgCrop>
the reason is the following: I know the url of the image when I load the component and I want to crop this image
I think you can directly do it like this in current version?
hey @nanxiaobei
I wanna report an issue but my time is running out. your onModalCancel is uploading the image anyway, as it should close the cropper modal only. do you know how to fix it?
After popping up the cropping, drag and zoom in, then click the button to shrink it. It cannot be shrunk to 1, but can only be shrunk to 1.1. What should I do
onModalCancel will ignore the upload