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

Different Width and Height on cropper #16

Open
stefensuhat opened this issue Dec 19, 2016 · 2 comments
Open

Different Width and Height on cropper #16

stefensuhat opened this issue Dec 19, 2016 · 2 comments

Comments

@stefensuhat
Copy link

Hi,

Can you make an optional to set width and height for the cropper ?.

For example I want crop an image with width and height 800*600,
I don't want the cropper to be that big.

Thanks.

@stefensuhat stefensuhat changed the title Width and Height on cropper Different Width and Height on cropper Dec 19, 2016
@shichongrui
Copy link

They are optional now and can be determined by the new minConstraints prop. Check out this commit: 58ac999

@stefensuhat
Copy link
Author

stefensuhat commented Dec 20, 2016

@shichongrui hi. Sorry looks like I explained it wrong. What I mean is the cropper canvas.

I've set

                    <Cropper
                            ref='crop'
                            image={this.state.cover}
                            width={1920}
                            height={1080}
                            onImageLoaded={this.coverLoaded}
                            minConstraints={[400,225]}
                            />

But the div with className 'cropper' still show 1920 * 1080

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