Upgraded to latest version (15.1.0) and the position prop is no longer working as it is being ignored.
Panning and dragging the image fires onPositionChange successfully with the correct position. Just the initial position passed as prop is ignored.
I quickly glanced over the code and noticed that on AvatarEditor core, the getCroppingRect() function is never called with the position parameter like:
getCroppingRect(position)
As the position parameter is optional.
In contrast, in v14, getCroppingRect() internally uses the position from props, like so:
const position = this.props.position || { x: this.state.image.x, y: this.state.image.y, }
Upgraded to latest version (15.1.0) and the position prop is no longer working as it is being ignored.
Panning and dragging the image fires onPositionChange successfully with the correct position. Just the initial position passed as prop is ignored.
I quickly glanced over the code and noticed that on AvatarEditor core, the getCroppingRect() function is never called with the position parameter like:
getCroppingRect(position)As the position parameter is optional.
In contrast, in v14, getCroppingRect() internally uses the position from props, like so:
const position = this.props.position || { x: this.state.image.x, y: this.state.image.y, }