diff --git a/package.json b/package.json index 85429a42ae683943814fe432598885f646296d8c..7e67df578fe2c92e0cfaaceccacbb44507f12d15 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "scratch-blocks": "latest", "scratch-render": "latest", "scratch-storage": "^0.2.0", + "scratch-svg-renderer": "latest", "scratch-vm": "latest", "selenium-webdriver": "3.5.0", "startaudiocontext": "1.2.1", diff --git a/src/containers/costume-tab.jsx b/src/containers/costume-tab.jsx index 6a24e004b8355540fba6c22d844b1220a181c0a3..65aced936709cfcae184fec8669bea514f614835 100644 --- a/src/containers/costume-tab.jsx +++ b/src/containers/costume-tab.jsx @@ -48,8 +48,8 @@ class CostumeTab extends React.Component { this.props.vm.deleteCostume(costumeIndex); } - handleUpdateSvg (svg) { - this.props.vm.updateSvg(this.state.selectedCostumeIndex, svg); + handleUpdateSvg (svg, rotationCenterX, rotationCenterY) { + this.props.vm.updateSvg(this.state.selectedCostumeIndex, svg, rotationCenterX, rotationCenterY); } render () { @@ -100,6 +100,8 @@ class CostumeTab extends React.Component { {target.costumes ? <PaintEditor svg={this.props.vm.getCostumeSvg(this.state.selectedCostumeIndex)} + rotationCenterX={this.props.vm.editingTarget.sprite.costumes[this.state.selectedCostumeIndex].rotationCenterX} + rotationCenterY={this.props.vm.editingTarget.sprite.costumes[this.state.selectedCostumeIndex].rotationCenterY} onUpdateSvg={this.handleUpdateSvg} /> : null