ValentinH / svelte-easy-crop

A Svelte component to crop images with easy interactions
https://codesandbox.io/s/svelte-easy-crop-basic-demo-q1005?file=/App.svelte
MIT License
199 stars 31 forks source link

Changing the `aspect` value updates the crop area but does not trigger `on:cropcomplete` #54

Closed lolmaus closed 3 months ago

lolmaus commented 4 months ago

Reproduction: https://github.com/lolmaus/slice-and-dice/commit/61180d0ad8c442e7bdb24c64f230a18c2aedf9d0

Steps to reproduce:

  1. Upload an image (it's not sent to any backend), you will immediately see the crop result below the Cropper.
  2. Change the aspect ratio.

Expected result: the crop area should update, reflecting the new aspect ratio. The crop result should update accordingly.

Actual result: the crop area updates, reflecting the new aspect ratio. But the crop result does not update and still uses the old aspect ratio, because on:cropcomplete was not called.

ValentinH commented 3 months ago

Fixed in https://github.com/ValentinH/svelte-easy-crop/releases/tag/v2.0.4

lolmaus commented 3 months ago

Thanks!