Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handler doc is wrong, please update it. #74

Closed
FrankKai opened this issue Jul 2, 2020 · 2 comments
Closed

Event handler doc is wrong, please update it. #74

FrankKai opened this issue Jul 2, 2020 · 2 comments

Comments

@FrankKai
Copy link

FrankKai commented Jul 2, 2020

Now is wrong:

<vue-cropper
  ref="cropper"
  :src="imgSrc"
  alt="Source Image"
  @ready="..."
  @cropstart="..."
  @cropmove="..."
  @cropend="..."
  @crop="..."
  @zoom="..."
>
</vue-cropper>

Because your src code is:

props:{
    ...
    // callbacks
    ready: Function,
    cropstart: Function,
    cropmove: Function,
    cropend: Function,
    crop: Function,
    zoom: Function
    ...
}

The correct way is:

<vue-cropper
  ref="cropper"
  :src="imgSrc"
  alt="Source Image"
  :ready="..."
  :cropstart="..."
  :cropmove="..."
  :cropend="..."
  :crop="..."
  :zoom="..."
>
</vue-cropper>

The current way doesn't work, the correct way works fine in my project.

Please update it, thank you.

@Agontuk
Copy link
Owner

Agontuk commented Jul 16, 2020

Both works fine, check your project & vue-cropperjs version.

@Agontuk Agontuk closed this as completed Jul 16, 2020
@jshrssll
Copy link

Thanks @FrankKai - I couldn't get the events to work with the @ready syntax either in version ^4.0.0. Using the :ready syntax works. Cheers 🍻

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

No branches or pull requests

3 participants