Agontuk/vue-cropperjs

Event handler doc is wrong, please update it.

FrankKai opened this issue · 2 comments

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.

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

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 🍻