Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

Handling events before and after the cropper was built #35

Closed
Skysplit opened this issue Jul 6, 2014 · 3 comments
Closed

Handling events before and after the cropper was built #35

Skysplit opened this issue Jul 6, 2014 · 3 comments

Comments

@Skysplit
Copy link

Skysplit commented Jul 6, 2014

It would be nice to have events before the cropper was fully build, something like

$(elem).cropper({
    beforeBuilt: function() {
        $(this) // refers to cropper
    }
});

or

$(elem).cropper({
// config here
}).on('cropper.beforeBuilt', function(){
    // Random code
});

Actually I would gladly see both of these :)

@fengyuanchen
Copy link
Owner

Thank you! I'll think about this.

@LeEnno
Copy link
Contributor

LeEnno commented Jul 9, 2014

+1

I miss a "real" success callback, that only fires once (and not every time the crop zone moves as with the done callback). With beforeBuilt this would be possible somehow. Maybe an afterBuilt would get even closer. This would be similar to Bootstrap's modal logic with its show and shown events.

@fengyuanchen
Copy link
Owner

I have supported these events from v0.4.0. Thank you for your suggestions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants