Closed leonwisdom closed 9 months ago
I found the problem to the issues i was having.
Another component i have wasn't retrieving the cropper coordinates after i updated the images array on the carousel. I also add the code below to my retrieveCropperConfig function and now when i step back in the form process, the saved cropper coordinates now get applied.
const { width, height, left, top } = cropperConfig.coordinates;
cropper.setCoordinates({
width: width,
height: height,
left: left,
top: top
})
cropper.move(left, top);
I need to be able to store the cropper config settings, to use them again later i.e a user wants to go back a step and need to load the last known settings (coordinates, visibleArea etc) for each cropper.
The code below isn't exact but it shows what i'm trying to achieve.
I don't know if its possible but i'm trying to get it working. I haven't found anything that could help in the docs, so i thought i would reach out here. Has any one had a need to do this, know how or could share a solution or advice?