Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

maximize:true does not work all image resolutions #38

Open
Aakash-sanandiya opened this issue Sep 20, 2016 · 0 comments
Open

maximize:true does not work all image resolutions #38

Aakash-sanandiya opened this issue Sep 20, 2016 · 0 comments

Comments

@Aakash-sanandiya
Copy link

Hello,

I have an issue setting cropper viewer to cover full height and width of the image being cropped when initializing it. I have used maximize:true param for this but this doesn't seem to work for all image resolutions. I am having a hard time figuring out why by looking at the source.

Image size it doesn't work for right now - 960x641

Below is my configuration for initializing cropper

vm.imageCropperOptions = {
            maximize: true,          
            done: function(dataNew) {
                imgCropData = dataNew;
            }
        };

ngCropper version - 0.2.2

I found that changing dragger.heightand dragger.width to 1 from 0.8 in initDragger() function does the job. Is this the correct solution ?

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

No branches or pull requests

1 participant