Croppie icon indicating copy to clipboard operation
Croppie copied to clipboard

🙏Feature request: add a method for change viewport size

Open viratsoft opened this issue 5 years ago • 1 comments

Hello, Thank for nice library. but one most important feature is missing. can't change view port size after bind image. Please add a method to change the viewport size at runtime using custom width height. 🙏 Thank you,

viratsoft avatar Jul 17 '20 12:07 viratsoft

Yes, this is an important feature, please add this method.

Here's my small trick i used, i want to share, may help others.

So, my problem was i wanted to upload banner and logo on same page, both required different viewport, but cant create 2 instances of croppie and nor can modify viewport so what i did is when file input field is changed, i added an class to the crop wrapper (banner, logo), based on class i modified the css, the width and height for viewport, and it worked perfectly!

pkjindal111 avatar Mar 30 '21 12:03 pkjindal111