From 1f4388ca7843e31bf354383efe67919554b437a1 Mon Sep 17 00:00:00 2001
From: DD <liudi08@gmail.com>
Date: Thu, 26 Apr 2018 17:47:13 -0400
Subject: [PATCH] Change how information is sent to the vm to match the usual
 definitions the VM uses for that information

---
 src/containers/paint-editor-wrapper.jsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx
index fec7899d7..decb5c85d 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 () {
-- 
GitLab