aewebsolutions / rcrop

Responsive Cropper is a full responsive JQuery plugin that lets you select an area from an image and prepare crop information to send it to the server.
MIT License
47 stars 23 forks source link

Off canvas #1

Closed greggmojica closed 7 years ago

greggmojica commented 7 years ago

Hello - I am using a basic implementation of rcrop and it is always cropping off the image canvas when I move it. Why would this occur? Advice would be appreciated!

aewebsolutions commented 7 years ago

Sorry, I don't understand the issue. Please, explain yourself again. Also, have you seen these examples?Maybe they could help you:

1der1 commented 7 years ago

I made a video which shows the problem: https://www.youtube.com/watch?v=xb5DYNIuGZY&feature=youtu.be

As soon as you move the selection, the values for width and height go down.

It's worse the smaller the canvas is compared to the original picture.

I assume it is due to rounding when using the width and height values from the canvas,

aewebsolutions commented 7 years ago

Please, give me a link to inspect. I've seen the video but I have no clue when and where this issue has place. As you can see, first advance demo (https://rawgit.com/aewebsolutions/rcrop/master/demos/advanced.html) has no problem at all.

1der1 commented 7 years ago

Use a huge picture on a responsive page, then make the page as small as possible. This should be enough to reproduce the problem.

The video is a demo for 1der1. I only noticed the problem, when I made the video and I had to make everything small enough to fit into the video.

You can check it yourself here: https://1der1.com/pages/update

(it requires a free registration)

1der1 commented 7 years ago

I checked the demo page again: If you make the window width as small as possible, you will see the value for width changing as soon as you move the selection.

aewebsolutions commented 7 years ago

Yes, you are right, I've seen it. When you asign a value by resize method or when you resize window and then move crop area, width and height are calculated again, but now from crop area, and values are rounded. So, crop change. I have to think how to fix this issue.

1der1 commented 7 years ago

Thank you so much, rcrop is just awesome. I tried the other crop plugins as well, but rcrop is the best.

1der1 commented 7 years ago

Why recalculate width and height at all? The moving never changes width and height. So you could do just nothing or set the crop area from the values you have. If required, you can still calculate x & y from the crop area,

1der1 commented 7 years ago

Another video, about the flexibility of rcrop: https://www.youtube.com/watch?v=rHI8ZvYN5Ek

aewebsolutions commented 7 years ago

Bugs have been fixed!

1der1 commented 7 years ago

Thank you so much for your prompt fix, Ángel Espro.

rcrop is just the best cropping tool. I installed several other well-known croppers, but they all had major issues. I am glad I finally found rcrop. It has everything you need and the programming is very lean, clean and clever as well.

aewebsolutions commented 7 years ago

Thank you so much for your words!