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
Tags 0.1.0-prerelease.20191104213759
No related merge requests found
......@@ -152,8 +152,8 @@ class Blocks extends React.Component {
onTargetsUpdate () {
if (this.props.vm.editingTarget) {
['glide', 'move', 'set'].forEach(prefix => {
this.updateToolboxBlockValue(`${prefix}x`, this.props.vm.editingTarget.x.toFixed(0));
this.updateToolboxBlockValue(`${prefix}y`, this.props.vm.editingTarget.y.toFixed(0));
this.updateToolboxBlockValue(`${prefix}x`, Math.round(this.props.vm.editingTarget.x).toString());
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