-
Notifications
You must be signed in to change notification settings - Fork 920
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
Rotate image #75
base: master
Are you sure you want to change the base?
Rotate image #75
Conversation
is there any method to scale image instead of using html?
|
Hi @Mickey- ,
The image size will be dynamically changed according to the returned value of getImageStyle() in this case. |
Sorry,Maybe I didn't speak clearly @tejitak
But what I need is scale image, not crop it,just like What should I do? whatever, thank you very much: ) P.S. Where can I get full documentation? |
Hi @Mickey- , I modified the code and added an attributed 'imageScale' in my new forked branch. Please try the following procedure.
Note that it is just a temporary patch and not fully tested. |
+1 on this. Ideally it'd be great to just pass the drawImage properties down via
|
@tejitak does the drawImage event support appending options (focusPoint) like that? I can't find docs on the function where it accepts the extra object after |
Hi @adamellsworth , Regarding the extra object, there is no docs. Also, there looks no functions to execute with them despite some options (focusPoint) exist in CanvasUtil.js. I'm not sure what the options exactly mean. I think we need tweak the codes to pass these params. |
Thanks for looking into this and keep up the branches! Yours in particular helped me understand what we needed to do in order to accomplish our desired ends. |
Any news on that? Looks like a valuable feature, any chance it could be merged? |
It is an enhancement that image component accepts a specified rotate (angle) value.
Usages is a just setting rotate as a prop like below.
e.g. jsx in css-layout example
<Image src='http://lorempixel.com/360/420/cats/1/' style={this.getImageStyle()} fadeIn={true} rotate={20} />
I need this capability to implement a rotating jump action in a simple game by using React state.
e.g.
<Image src="..." rotate={this.state.rotate} />