You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very nice cropper. As documentation is incomplete, I haven't found answers to the following;
Is there a way to disable the cropper? disabled: bool
How does the responsiveness work here? I can see the examples are responsive but with normal UI, it isn't for me. The whole wrapper doesn't scale and the image is at fixed size.
Is there an img on load event? As the cropper is always undefined for me with the onReady event. I need to get the image details ie with/height when the cropper is initialised. Currently, I'm create a new image and getting the dimensions that method which isn't ideal.
<Cropper
ref={cropperRef}
src={image}
backgroundWrapperProps={{
scaleImage: false,
}}
imageRestriction="fitArea"
onChange={onChange}
onMoveEnd={onMoveEnd}
onResizeEnd={onResizeEnd}
className="cropper"
resizeImage={false}
moveImage={false}
checkOrientation={false}
minWidth={props?.minWidth}
minHeight={props?.minHeight}
onReady={(cropper) => {
// undefined: cropper, cropperRef.current
}}
// need a disabled prop so I can't only show a "preview" like UI until a button is clicked
stencilProps={{
handlers: isCropping ? true : false,
lines: isCropping ? true : false,
aspectRatio: props?.aspectRatio ? props?.aspectRatio : '',
movable: isCropping ? true : false,
}}
/>
Edit: found the issue with the responsiveness on my end. It is working as it should now. However, is there a way of defining a max width & height on the wrapper?
The text was updated successfully, but these errors were encountered:
Very nice cropper. As documentation is incomplete, I haven't found answers to the following;
disabled: bool
cropper
is always undefined for me with theonReady
event. I need to get the image details ie with/height when the cropper is initialised. Currently, I'm create a new image and getting the dimensions that method which isn't ideal.Edit: found the issue with the responsiveness on my end. It is working as it should now. However, is there a way of defining a max width & height on the wrapper?
The text was updated successfully, but these errors were encountered: