My block is showing but the OnNotify doesn't start

My block is showing but the OnNotify doesn't start

  

Hello,

I'm using the Cropper plugin and the ImageCropper block shows but the OnNotify action doesn't start.


Thank you


Hi,

Did you call the NotifyClipboardImage action when the user confirms that he wants that image?

Best Regards,

Marcelo

Marcelo Ferreira wrote:

Hi,

Did you call the NotifyClipboardImage action when the user confirms that he wants that image?

Best Regards,

Marcelo

I think you are refering to NotifyCroppedImage. Yes, I call that action when the user finishes the cropp. 

But I'm refering to the OnCropperNotify, the action that should be called when the block shows up to do the actual cropping.



Sry. yes that's what I meant. I don't understand which notify you are talking about. the notify destination of ImageCropper widget? can you share a picture or something so i can understand what you doing? I also can share a working example if you prefer.

Regards,

Marcelo


I was checking the demo better and that Notify you are talking about should trigger after you run NotifyCroppedImage. When you click the button below you should get the download of the image you cropped.

After you have a image and crop it and you click this button nothing happen?

Regards,

Marcelo

Marcelo Ferreira wrote:

I was checking the demo better and that Notify you are talking about should trigger after you run NotifyCroppedImage. When you click the button below you should get the download of the image you cropped.

After you have a image and crop it and you click this button nothing happen?

Regards,

Marcelo


No, no. The OnCropperNotify is when you do the actual crop, before the download.

You basically have 3 actions:

- Upload - where you store the image to crop;

- OnCropperNotify - to create the cropped image

- SetImage - to run NotifyCroppedImage 


The block ImageCropper appears after the upload (the if condition cropper <> null is updated) but the action OnCropperNotify does not run so I only get the image without the crop option


Thank you

Hi

Based on your actions they should run on this order:

  1. Upload - Where you receive a image from upload and store that image on one entity inside cropper espace. This action should be a submit. This way the imageCropper widget will reload and let the user choose which part of the image he wants. here you should see the image with the crop option
  2. SetImage - Bellow the imageCropper widget you need a button for the user to click when he choose the crop that he wants. That button should run your setImage action. The NotifyCroppedImage will trigger the imageCropper to notify
  3. OnCropperNotify - Only after everything the OnCropperNotify will run

If you don't even see the crop option is normal that the OnCropperNotify doesn't run because that is the last step.

Is strange that you don't see the crop on the top of the image. Can you share your oml so i can take a look into it?

Regards,

Marcelo