From ed3560df2ec90ec75305420c60c0611de370c48c Mon Sep 17 00:00:00 2001
From: DD <liudi08@gmail.com>
Date: Mon, 30 Apr 2018 16:33:43 -0400
Subject: [PATCH] We realized that the VM actually uses actual rotation center,
 so I moved the point where division by 2 happens into the VM

---
 src/containers/paint-editor-wrapper.jsx | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx
index 514f4b5bc..e06e46be6 100644
--- a/src/containers/paint-editor-wrapper.jsx
+++ b/src/containers/paint-editor-wrapper.jsx
@@ -25,19 +25,16 @@ class PaintEditorWrapper extends React.Component {
     handleUpdateImage (isVector, image, rotationCenterX, rotationCenterY) {
         if (isVector) {
             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 */);
+                image,
+                rotationCenterX,
+                rotationCenterY);
         } else {
             this.props.vm.updateBitmap(
                 this.props.selectedCostumeIndex,
                 image,
-                rotationCenterX / 2,
-                rotationCenterY / 2,
+                rotationCenterX,
+                rotationCenterY,
                 2 /* bitmapResolution */);
         }
     }
@@ -72,12 +69,10 @@ const mapStateToProps = (state, {selectedCostumeIndex}) => {
     } = state.targets;
     const target = editingTarget && sprites[editingTarget] ? sprites[editingTarget] : stage;
     const costume = target && target.costumes[selectedCostumeIndex];
-    const resolution = costume &&
-        (costume.dataFormat === 'png' && costume.dataFormat === 'jpg') ? costume.bitmapResolution / 2 : 1;
     return {
         name: costume && costume.name,
-        rotationCenterX: costume && costume.rotationCenterX / resolution,
-        rotationCenterY: costume && costume.rotationCenterY / resolution,
+        rotationCenterX: costume && costume.rotationCenterX,
+        rotationCenterY: costume && costume.rotationCenterY,
         imageFormat: costume.dataFormat,
         imageId: editingTarget && `${editingTarget}${costume.skinId}`,
         vm: state.vm
-- 
GitLab