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 ignores parent dimensions #38

Closed
mrspence opened this issue Oct 19, 2018 · 2 comments
Closed

Cropper ignores parent dimensions #38

mrspence opened this issue Oct 19, 2018 · 2 comments

Comments

@mrspence
Copy link

Thank-you for porting cropper.js over to Vue!

When using the vue component, I notice it ignores the parent dimensions, and forcefully overflows. Example below:

image

As you can see it's disappearing below the image where overflow: hidden is active. If i disable this style rule, then I can see the cropping container and cropping image falling outside of its 'boundaries'.

What would you suggest? I'm essentially looking for a way to force the cropping container to sit within the viewport.

Thank-you for your help!

@mrspence
Copy link
Author

Realised this can be achieved with the containerStyle attribute, something like this:

<vue-cropper ref="cropper" :src="blob" alt="Section Image" :cropmove="cropImage" containerStyle="max-height:50vh"></vue-cropper>

@Agontuk
Copy link
Owner

Agontuk commented Oct 21, 2018

Since you found a solution, I'm closing this.

@Agontuk Agontuk closed this as completed Oct 21, 2018
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

2 participants