Skip to content
Snippets Groups Projects
Commit 58d5286b authored by Ray Schamp's avatar Ray Schamp
Browse files

Calculate rotation centers from backdrop library

The `info` property seems to refer to the image size, not the rotation center in the backdrop library. So if it exists, halve it to find the center.

Towards #18
parent 845076ca
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@ class BackdropLibrary extends React.Component {
const vmBackdrop = {
skin: `https://cdn.assets.scratch.mit.edu/internalapi/asset/${item.md5}/get/`,
name: item.name,
rotationCenterX: item.info[0],
rotationCenterY: item.info[1]
rotationCenterX: item.info[0] && item.info[0] / 2,
rotationCenterY: item.info[1] && item.info[1] / 2
};
if (item.info.length > 2) {
vmBackdrop.bitmapResolution = item.info[2];
......
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