From 2df5466fb205c698d7566ddfac3f1e1c7f046465 Mon Sep 17 00:00:00 2001 From: Quicksticks-oss Date: Fri, 29 Mar 2024 20:18:20 -0400 Subject: [PATCH] Made the react ui go to the 2 decmal place. --- app/pages/PageEnigma/js/editor.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/pages/PageEnigma/js/editor.ts b/app/pages/PageEnigma/js/editor.ts index 7a324f2cc1..8fa8909de4 100644 --- a/app/pages/PageEnigma/js/editor.ts +++ b/app/pages/PageEnigma/js/editor.ts @@ -956,20 +956,21 @@ class Editor { let pos = this.selected.position; let rot = this.selected.rotation; let scale = this.selected.scale; - + this.dispatchAppUiState({ type: APPUI_ACTION_TYPES.SHOW_CONTROLPANELS_SCENEOBJECT, payload: { currentSceneObject: { objectVectors: { - position: { x: pos.x, y: pos.y, z: pos.z }, - rotation: { x: rot.x, y: rot.y, z: rot.z }, - scalar: { x: scale.x, y: scale.y, z: scale.z }, + position: { x: parseFloat(pos.x.toFixed(2)), y: parseFloat(pos.y.toFixed(2)), z: parseFloat(pos.z.toFixed(2)) }, + rotation: { x: parseFloat(rot.x.toFixed(2)), y: parseFloat(rot.y.toFixed(2)), z: parseFloat(rot.z.toFixed(2)) }, + scalar: { x: parseFloat(scale.x.toFixed(2)), y: parseFloat(scale.y.toFixed(2)), z: parseFloat(scale.z.toFixed(2)) }, } } } }); } + // Automaticly resize scene. onWindowResize() {