Uploaded image don't use all the available space when using init-max-area="true"
See original GitHub issueI’ve been trying to use ui-cropper to crop and upload an image. To do this, I created a div to show the uploaded image and the crop tool, using the following code:
<div
ngf-drop
ng-model="headerImage"
ngf-pattern="image/*"
class="cropArea"
flex>
<ui-cropper
image="headerImage | ngfDataUrl"
area-type="rectangle"
ng-init="croppedDataUrl=''"
aspect-ratio="2.6"
result-image="croppedDataUrl"
result-image-size="{w:960,h:370}"
init-max-area="true">
</ui-cropper>
</div>
<div>
<img ng-src="{{croppedDataUrl}}" alt=""/>
</div>
But when I upload an image, the image is not using the entire space of the ui-crop area, like this:
What can it be?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
CrackerakiUA/ui-cropper
The problem is not with the ratio, but with init-max-area="true". ... As you can see, the uploaded image can't take all the space...
Read more >Make uploaded images fit the same dimensions within a card
Use aspect-ratio on the image like in the snippet below. body { font: 16px sans-serif; margin: 0 } .cards { display: flex; gap:...
Read more >Card Design Studio Service Questions
Why isn't my card available for customization? ... Can I preview or store my uploaded images online? ... How long will it take...
Read more >Customise a card - Card Interface - GitHub Pages
Image. A visual intended to help students connect/associate conceptually and emotionally with the item the card represents. Rather than an image this can...
Read more >Picture Perfect
With Picture Perfect, you can upload your favorite photos of family, ... And, best of all, it's free for America First members. ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i was having same issue. after i added reference of ui-cropper.css then canvas worked perfectly.
I am not using this feature, but from what i have seen in my tests, you have to add something in the css. In near feature i will checkup codepens and add one with this feature.