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

How can I update a component when I change a property? #16

Open
Archakov06 opened this issue Sep 2, 2017 · 2 comments
Open

How can I update a component when I change a property? #16

Archakov06 opened this issue Sep 2, 2017 · 2 comments
Labels

Comments

@Archakov06
Copy link

Archakov06 commented Sep 2, 2017

I have the function of rotating the image by 90 degrees. With the help of your component, I wanted to trim and add a similar function. But, if you change the props or styles in realtime, no changes are made. How can I update a component when I change a property?

<Cropper
  src="https://pp.userapi.com/c635100/v635100717/5ab03/dayRZ88QD4o.jpg"
  ref="cropper"
  originX={0}
  originY={0}
  styles={{
    img: {
      transform: `rotate(${this.state.rotateDeg}deg)`
    }
  }}
/>

Also, you have to render a new one, if you change the ratio.

@flyfloor flyfloor added the bug label Sep 4, 2017
@flyfloor
Copy link
Owner

flyfloor commented Jan 29, 2018

@Archakov06 sorry, currently not support this, rotate will lead to complicated circumstance

@mobicity
Copy link

Do we have a preview on this? I wanted a cropper with the possibility of rotating the photo

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

No branches or pull requests

3 participants