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

cropper-viewer option to behave like like css background-size: cover #1214

Open
ronnievdc opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@ronnievdc
Copy link

Is your feature request related to a problem? Please describe.
I like to use Cropper to show previews of the cropped image as they would appear in an environment where the final image is displayed with the following css background-size: cover; background-position: center center;

Describe the solution you'd like
Extend the cropper-viewer -> resize property with "cover" and "contain"
Add a second property position where center center or other background-position values can be filled

Describe alternatives you've considered
Call CropperSelection.$toCanvas each change (debounced) and create a canvas with object-fit: cover

Additional context
Screenshot 2024-11-19 at 14-24-55 Title

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

1 participant