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

Cropped Image Size responsive viewport #37

Open
playUruguay opened this issue Aug 7, 2017 · 2 comments
Open

Cropped Image Size responsive viewport #37

playUruguay opened this issue Aug 7, 2017 · 2 comments

Comments

@playUruguay
Copy link

Hi!

I understand that the size of the cropped picture is the same as the container, but in case of resizing because it is responsive, the size of the resulting image should not change.

Is there any way to set the size of the final image?
Thanks!

@orifn
Copy link
Collaborator

orifn commented Sep 4, 2017

hi @playUruguay
The question about responsive is open for now. So, you can investigate on it if have any proposals.
Regarding image resizing there are some possibilities like below:

c.result({
    type: 'canvas',
    size: {
        width: 500,
        height: 500,
    },
    quality: 0.8    // 80%
});

@timaxapa
Copy link

timaxapa commented Dec 19, 2017

@orif-jr Hi!
I have an issue with small resolution - the component isn't responsive.
image

I can't change viewport and boundary dynamically. I tried the following code, but nothing changes:

                // respond to changes in viewport
                scope.$watch('viewport', function (newValue, oldValue) {
                    if (typeof scope.viewport === 'undefined') {
                        throw 'ngCroppie: Image viewport undefined!'
                    } else {
                        c.options.viewport.width = scope.viewport.w;
                        c.options.viewport.height = scope.viewport.h;
                        c.options.boundary.width = scope.viewport.w;
                        c.options.boundary.height = scope.viewport.h;
                        var newOptions = angular.copy(c.options);
                        c.bind(newOptions)
                    }
                });

Is it possible to make the croppie responsible? Thanks.

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