Skip to content
Snippets Groups Projects
Commit 1f4388ca authored by DD's avatar DD Committed by DD Liu
Browse files

Change how information is sent to the vm to match the usual definitions the VM...

Change how information is sent to the vm to match the usual definitions the VM uses for that information
parent a8474509
Branches
Tags
No related merge requests found
......@@ -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 () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment