advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
930 stars 128 forks source link

fix: handle differing source and result sizes in updateCanvas #270

Closed DerZade closed 3 weeks ago

DerZade commented 3 months ago

updateCanvas has a bug which only really comes to light if the size of the canvas and the size of the original image differ drastically and the image offset is positive. The dx and dy are not adjusted for the size difference.

Here is a visual representation:

Frame 22 (1)

Since the output (100px) is half the size of the input (200px) the dx and dy have to be halfed.


The same issue seems to exist in the master branch. I'll gladly also create a PR for the master branch, once this is merged :)

DerZade commented 2 months ago

This has been open for over a month now.

@Norserium anything I can do to get this merged?

DerZade commented 1 month ago

This has been open for over two months now.

@Norserium anything I can do to get this merged?

Norserium commented 3 weeks ago

@DerZade, I will look this pull request on this weekend.

Norserium commented 3 weeks ago

@DerZade, your pull request is great, thank your for the important fix!

There is only one nuance. The changes that common to both versions are pushed to master, then I rebase vue-next on master. It's not the perfect flow, but it works.

Don't you mind if I commit this change by myself? If you do mind, please create the pull request from master branch.

DerZade commented 3 weeks ago

Closed in favor of #276