pzppzz / konvajs-image-crop-demo

An example that shows how to crop image with konva
https://pzppzz.github.io/konvajs-image-crop-demo
MIT License
13 stars 1 forks source link

[Bug]: Crop the image at "middle-left" and "top-center" #4

Open pcldev opened 1 month ago

pcldev commented 1 month ago

When cropping the "middle-left" and "top-center", the behavior is different from the "middle-right" and "bottom-center". It should be crop as well.

Attachment: https://github.com/user-attachments/assets/f8d4f108-cbe2-4257-b118-9845419ed1b7

pzppzz commented 1 month ago

You're right. I have tried that before, but I found that the Konva Transformer cannot correctly calculate the bounding box of the image in this case. I'm not sure if this is the reason, as it's been a while since I created this demo. I'll take some time to look into it further, so please stay tuned.

pzppzz commented 1 month ago

Actually, this is a bug.😄😄