Modify rounding logic

This commit is contained in:
sjhuang26 committed 2017-12-23 10:15:35 -05:00
1 parent fa96052863
commit bc7ade8bc4
1 file changed
+2 -2
+2 -2
View File
@@ -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());
});
}
}