-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Question]: Set Zoom for the cropper on initilization #182
Comments
Hi @saadsaeed01. I suppose this option only available when the autoCrop option had set to the true, see official documentation: https://github.com/fengyuanchen/cropperjs#data |
Hi @MaxymGorn |
@saadsaeed01 You can try to use Zoom or ZoomTo, for example in OnCropReadyEvent, because OnAfterRender method cropper component can't be able/ready to receive and perform commands Although, you need to save zoom ratio |
Hi @MaxymGorn Check out this solution, Hopefully, this will help other developers too. This is achieved using OnReadyEvent Thank you for your valuable input :) Regards |
Hi
I have an issue that I wanted to discuss related to setting up the initial Zoom
Let's say when I upload the image the initial state of the cropper is this
Now without Zooming in or Zooming out, I change the position of the crop window and save my entity
If I now save my card the position of the cropper window will persist. The image below shows the position of the cropper window when I save my card and visit the page again
Problem
If I Zoom out or Zoom In in the cropper like this and save the entity
The zoom is not persisted. Check what happened below
I am saving the following Meta Information
On initializing the cropper, I set the non-zoom properties like this in SetDataOptions
And I set the zoom properties by calling the ZoomTo method
Is there a special way to set the zoom of the canvas, unfortunately, I am not very clear about this. Waiting for your response
I am using Blazor Server NET 6 and the package version is 1.2.4 which is the latest stable
Thank you very much!
Regards
Saad
The text was updated successfully, but these errors were encountered: