diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx index fec7899d7f28c0a659a63f39c8492980a850717d..decb5c85d70740f1c2ebd86431147d727f5eae6e 100644 --- a/src/containers/paint-editor-wrapper.jsx +++ b/src/containers/paint-editor-wrapper.jsx @@ -24,9 +24,21 @@ class PaintEditorWrapper extends React.Component { } handleUpdateImage (isVector, image, rotationCenterX, rotationCenterY) { if (isVector) { - this.props.vm.updateSvg(this.props.selectedCostumeIndex, image, rotationCenterX, rotationCenterY); + this.props.vm.updateSvg( + // Divide by 2 because the VM's definition of the rotation center + // is the paint editor's definition of the rotation center + // divided by the bitmap resolution + this.props.selectedCostumeIndex, + image, rotationCenterX / 2, + rotationCenterY / 2, + 2 /* bitmapResolution */); } else { - this.props.vm.updateBitmap(this.props.selectedCostumeIndex, image, rotationCenterX, rotationCenterY); + this.props.vm.updateBitmap( + this.props.selectedCostumeIndex, + image, + rotationCenterX / 2, + rotationCenterY / 2, + 2 /* bitmapResolution */); } } render () {