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
Describe the bug
After cropping the original image, the newly cropped image is displayed on the UI. However, when I switch between the tabs, the CSS details for the cropped image are reset to 0px. The data or details persist for the original tab where the image is cropped but are lost when the tab is switched. Also, can we send multiple CSS classes? If so, how can be they assigned either using an array or comma separated string.
To Reproduce
Steps to reproduce the behavior:
Upload the original image.
Select the desired area of the image and crop it.
Observe that the cropped image is correctly displayed in the UI.
Switch to another tab and observe the images are not displayed.
Now switch back to the original tab and observe that the cropped image is visible.
Expected behavior
The copped image should be displayed when tabs are switched, and the style and CSS details should persist. Whenever I switch the tabs the cropped image should persist/visible on all tabs.
My findings are that the cropped image is shown in the preview div that is available in the DOM. If that preview is not visible/available in the current tab or DOM, the image is not rendered.
Hi @JunaidSultan20 . I you wanna persist image cropper preview after destroying cropper component(case when you change tabs) you need get image from preview or using GetCroppedCanvasDataURLAsync method cropper component for saving image as base64 and use it. Example getting image:
Describe the bug
After cropping the original image, the newly cropped image is displayed on the UI. However, when I switch between the tabs, the CSS details for the cropped image are reset to 0px. The data or details persist for the original tab where the image is cropped but are lost when the tab is switched. Also, can we send multiple CSS classes? If so, how can be they assigned either using an array or comma separated string.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The copped image should be displayed when tabs are switched, and the style and CSS details should persist. Whenever I switch the tabs the cropped image should persist/visible on all tabs.
Screenshots
Code Snippet
Options = new Options() { AspectRatio = CropperWindowWidth / CropperWindowHeight, ViewMode = ViewMode.Vm0, CorrelationId = Guid.NewGuid().ToString(), Preview = PreviewClass, AutoCrop = true, DragMode = "move" };
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: