With https://github.com/lavrton/react-konva
How can I flip an image (horizontally or vertically) I am using this function, but it is not working:
flip = direction => {
this.setState({
width: -this.state.width
})
}
With https://github.com/lavrton/react-konva
How can I flip an image (horizontally or vertically) I am using this function, but it is not working:
flip = direction => {
this.setState({
width: -this.state.width
})
}
It is better to use scale property:
<Image image={this.state.image} scaleY={-1} y={200}/>
So in your state, you should store scale
property with 1 or -1 values,
https://codesandbox.io/s/v6yk2j2w0l