Skip to content
Snippets Groups Projects
Unverified Commit e005d15f authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1122 from sjhuang26/issue-1048-negative-zeros

Modify rounding logic in flyout blocks
parents fa960528 bc7ade8b
No related branches found
No related tags found
No related merge requests found
...@@ -152,8 +152,8 @@ class Blocks extends React.Component { ...@@ -152,8 +152,8 @@ class Blocks extends React.Component {
onTargetsUpdate () { onTargetsUpdate () {
if (this.props.vm.editingTarget) { if (this.props.vm.editingTarget) {
['glide', 'move', 'set'].forEach(prefix => { ['glide', 'move', 'set'].forEach(prefix => {
this.updateToolboxBlockValue(`${prefix}x`, this.props.vm.editingTarget.x.toFixed(0)); this.updateToolboxBlockValue(`${prefix}x`, Math.round(this.props.vm.editingTarget.x).toString());
this.updateToolboxBlockValue(`${prefix}y`, this.props.vm.editingTarget.y.toFixed(0)); this.updateToolboxBlockValue(`${prefix}y`, Math.round(this.props.vm.editingTarget.y).toString());
}); });
} }
} }
......
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