We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a user uploads an image, I convert it to base64 and then crop it.
Upload Image Code
const reader = new FileReader(); reader.onload = (event) => { this.uploadImage = event.target.result; }; reader.readAsDataURL(e.target.files[0]);
<vue-cropper ref="cropper" :auto-crop="true" :data="data" :min-crop-box-height="150" :min-crop-box-width="150" :src="uploadImage" :view-mode="3" :zoom-on-wheel="false" @crop="fixDimensionCrop" />
On this function I'm getting an error maximum call stack exceed.
fixDimensionCrop(event) { let width = event.detail.width; let height = event.detail.height; if ( width < this.minCroppedWidth || height < this.minCroppedHeight || width > this.maxCroppedWidth || height > this.maxCroppedHeight ) { this.$refs.cropper.setData({ width: Math.max(this.minCroppedWidth, Math.min(this.maxCroppedWidth, width)), height: Math.max(this.minCroppedHeight, Math.min(this.maxCroppedHeight, height)), }); } },
@Agontuk Kindly have a look at it.
The text was updated successfully, but these errors were encountered:
I get this error while using base64, but everything is good when I use the local directory image path.
Sorry, something went wrong.
Also getting this error
No branches or pull requests
When a user uploads an image, I convert it to base64 and then crop it.
Upload Image Code
Vue Cropper Component
On this function I'm getting an error maximum call stack exceed.
fixDimensionCrop function is being called when user resize crop canvas.
@Agontuk Kindly have a look at it.
The text was updated successfully, but these errors were encountered: