Skip to content
Snippets Groups Projects
Commit c1e872a5 authored by Eric Rosenbaum's avatar Eric Rosenbaum
Browse files

correct rotation center for costumes

parent 1c37feb1
No related branches found
No related tags found
1 merge request!1Synching Fork
...@@ -25,12 +25,10 @@ class CostumeLibrary extends React.PureComponent { ...@@ -25,12 +25,10 @@ class CostumeLibrary extends React.PureComponent {
]); ]);
} }
handleItemSelected (item) { handleItemSelected (item) {
const rotationCenterX = item.dataFormat === 'svg' ? item.rotationCenterX : item.rotationCenterX / 2;
const rotationCenterY = item.dataFormat === 'svg' ? item.rotationCenterY : item.rotationCenterY / 2;
const vmCostume = { const vmCostume = {
name: item.name, name: item.name,
rotationCenterX, rotationCenterX: item.rotationCenterX,
rotationCenterY, rotationCenterY: item.rotationCenterY,
bitmapResolution: item.bitmapResolution, bitmapResolution: item.bitmapResolution,
skinId: null skinId: null
}; };
......
...@@ -179,13 +179,11 @@ class CostumeTab extends React.Component { ...@@ -179,13 +179,11 @@ class CostumeTab extends React.Component {
} }
handleSurpriseCostume () { handleSurpriseCostume () {
const item = costumeLibraryContent[Math.floor(Math.random() * costumeLibraryContent.length)]; const item = costumeLibraryContent[Math.floor(Math.random() * costumeLibraryContent.length)];
const rotationCenterX = item.dataFormat === 'svg' ? item.rotationCenterX : item.rotationCenterX / 2;
const rotationCenterY = item.dataFormat === 'svg' ? item.rotationCenterY : item.rotationCenterY / 2;
const vmCostume = { const vmCostume = {
name: item.name, name: item.name,
md5: item.md5ext, md5: item.md5ext,
rotationCenterX: rotationCenterX, rotationCenterX: item.rotationCenterX,
rotationCenterY: rotationCenterY, rotationCenterY: item.rotationCenterY,
bitmapResolution: item.bitmapResolution, bitmapResolution: item.bitmapResolution,
skinId: null skinId: null
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment