SfImageEditor Custom Cropping issue

Hey there,

I've been reading the guides on this and have tried looking to see if anyone has come across a similar issue, but so far I couldn't find anything relevant.

What I'm trying to do is to set up the ImageEditor to automatically start the Cropping overlay as soon as image loads, which I have done so with 

Editor.ToggleCropping(12, 7); 

the issue is that i'm unable to move my crop overlay around when I have it preset to a ratio, the only way that it lets me move it around is if I interact with the crop overlay (resizing it)

first image shows the view when the ImageEditor loads (im unable to move the box around at this point)

second image is after i size down the box and then resize it back (it allows me to move the box to the top)

The only thing I can think of that's making it do this is that the crop box is not in focus? if so, how can I have the crop box focused when the it shows up?

Thanks!


1 Reply

JK Jeya Kasipandi Syncfusion Team October 22, 2018 08:33 AM UTC

Hi Daniel,

Query : What I'm trying to do is to set up the ImageEditor to automatically start the Cropping overlay as soon as image loads. and i'm unable to move the box around at this point

We have created sample to load cropping overlay when the image loads using ImageLoaded event and please find the code snippet.

editor.ImageLoaded += (sender, args) => 
{
   editor.ToggleCropping(12, 7);
};


Sample Link: http://www.syncfusion.com/downloads/support/directtrac/general/ze/CropSample-239062718.zip  


Please try above sample and let us know if you are still facing problem.

Regards,
Jeya

Loader.
Up arrow icon