Closed jitheeshsk closed 7 years ago
Yes, that is the desired behavior. It's a cropper so it tires to pan the image to center.
Shouldn't the state of view be maintained, it should pan to center of screen not image right, just a suggestion
@jitheeshsk I don't understand. How can image pan to center of itself? Can you add a gif/video? That would help me understand the problem.
Attached is the gif showing the issue
@jitheeshsk Thanks for the gif. This is indeed a problem. Can you tell me which version of the lib are you using?
It is 0.1.8
@jitheeshsk I'm unable to reproduce it in 0.1.8 with min zoom 0.8f.
Hi the min zoom is not set, else the image cannot be the completely zoomed out. Check the min zoom value.
I set min zoom in cropperview.post(). As the minZoomValue is rewritten in onLayout of cropperImageView.
On Apr 20, 2017 3:16 PM, "Jay Rambhia" notifications@github.com wrote:
@jitheeshsk https://github.com/jitheeshsk I'm unable to reproduce it in 0.1.8 with min zoom 0.8f.
[image: crop_out] https://cloud.githubusercontent.com/assets/1256649/25224552/061b8fea-25bf-11e7-8e47-bc36f8ed5440.gif
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jayrambhia/CropperNoCropper/issues/21#issuecomment-295656332, or mute the thread https://github.com/notifications/unsubscribe-auth/AGMlV2VS9eaTcKyDZH8B5Ikl4L3XEVlrks5rxymHgaJpZM4NCswI .
@jitheeshsk oh yes, got the problem. I'll try to fix it. And also setMinZoom
should work out of the box.
@jayrambhia I will also see if there is a work around, will try to post if i am able to resolve the issue.
Thanks
in onUp()
f (scaleX < mMinZoom) {
if (DEBUG) {
Log.i(TAG, "set scale: " + mMinZoom);
}
float yy = ty * mMinZoom/scaleX;
if (showAnimation()) {
if(yy > 0)
yy = 0;
animateAdjustmentWithScale(tx, xx, ty, yy, scaleX, mMinZoom);
}
}
Fixed the issue for me
Fixed in 0.1.9.
@jitheeshsk
Set min zoom to 0.8f. Take an image which is really long in height, i'm using the below image.
Issue seems to be in on up private boolean onUp(){ ... if (showAnimation()) {
...
Should solve the issue,