react-advanced-cropper
react-advanced-cropper copied to clipboard
Is it possible to set the stencil coordinates?
I have two input text field for entering desired height and width, can stencil be placed according to that value.
@Ananthumpillai, yes, of course, you can set the coordinates programatically.
I want something like this According to my height and width stencil has to relocate @Norserium
@Ananthumpillai, I don't get, you can set the coordinates also. For example:
const resize(width, height) => {
if (cropperRef.current) {
cropperRef.current.setCoordinates(({ coordinates }) => {
width: width,
height: height,
left: (coordinates.left + coordinates.width / 2) - width / 2,
top: (coordinates.top + coordinates.height / 2) - height / 2
})
}
};
@Ananthumpillai, any news?