Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Possibility to turn off feature, when image can be panned when cropped #98

Open
RadoslawGorczyca opened this issue Aug 23, 2024 · 7 comments

Comments

@RadoslawGorczyca
Copy link

RadoslawGorczyca commented Aug 23, 2024

Hi, is it possible to add some kind of a flag allowing us to turn off following feature?

Unlike Image(), ZoomableImage can pan images even when they're cropped. This can be useful for applications like wallpaper apps that may want to use ContentScale.Crop to ensure that images always fill the screen.

Use case is that I have a horizontal pager and I want to allow user to pan cropped picture when the picture is zoomed in, but not when it's completely zoomed out, because when he try to scroll to the next page, image is panned and getting to next picture is allowed only when we pan to the edge of the picture.

I would really appreciate if you added this feature. Thank you in advance.

@saket
Copy link
Owner

saket commented Aug 23, 2024

but not when it's completely zoomed out, because when he try to scroll to the next page, image is panned and getting to next picture is allowed only when we pan to the edge of the picture.

I'm sorry, but I'm a bit confused. If the image is completely zoomed out, it shouldn't be possible to pan it any further, right?

Would it be possible for you to share a video of your use case?

@RadoslawGorczyca
Copy link
Author

You see how I have to scroll picture to the edge to change page? I would like the panning feature available only when the picture is zoomed in. Otherwise I would like to have standard cropped picture with trimmed edges.

Screen.Recording.2024-08-27.at.08.57.30.mov

@MHShetty
Copy link

MHShetty commented Sep 2, 2024

Hi @RadoslawGorczyca,

Could you please share your composable code related to this UI? Maybe that could help us help you out better

@RadoslawGorczyca
Copy link
Author

I cannot share any part of the code other than using your lib, but I don't see how my code would help with anything. It's not an error, but lack of possibility to turn off feature that you added to lib. Other person also mentioned it in his issue.

@RadoslawGorczyca
Copy link
Author

bump

@saket
Copy link
Owner

saket commented Sep 11, 2024

Sorry for the delay, I’ve been dealing with chickenpox. 🤒

@RadoslawGorczyca
Copy link
Author

No worries, I hope you're okay 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants