Skip to content
Snippets Groups Projects
Commit bc7ade8b authored by sjhuang26's avatar sjhuang26
Browse files

Modify rounding logic

parent fa960528
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