From b046a224fe7551468b340e30fdd935a0bbddd6df Mon Sep 17 00:00:00 2001
From: Paul Kaplan <pkaplan@media.mit.edu>
Date: Mon, 26 Feb 2018 15:27:28 -0500
Subject: [PATCH] Pass in only the props that the paint editor needs to prevent
 rerender

---
 src/containers/costume-tab.jsx          | 1 -
 src/containers/paint-editor-wrapper.jsx | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx
index 2e897c451..c54f2667f 100644
--- a/src/containers/costume-tab.jsx
+++ b/src/containers/costume-tab.jsx
@@ -218,7 +218,6 @@ class CostumeTab extends React.Component {
             >
                 {target.costumes ?
                     <PaintEditorWrapper
-                        {...props}
                         selectedCostumeIndex={this.state.selectedCostumeIndex}
                     /> :
                     null
diff --git a/src/containers/paint-editor-wrapper.jsx b/src/containers/paint-editor-wrapper.jsx
index 38cb3aa4a..52bb5708f 100644
--- a/src/containers/paint-editor-wrapper.jsx
+++ b/src/containers/paint-editor-wrapper.jsx
@@ -59,7 +59,8 @@ const mapStateToProps = (state, {selectedCostumeIndex}) => {
         name: costume && costume.name,
         rotationCenterX: costume && costume.rotationCenterX,
         rotationCenterY: costume && costume.rotationCenterY,
-        svgId: editingTarget && `${editingTarget}${costume.skinId}`
+        svgId: editingTarget && `${editingTarget}${costume.skinId}`,
+        vm: state.vm
     };
 };
 
-- 
GitLab