From b2f9880fd06bafc8f5d232e43114f62ed9aa2b99 Mon Sep 17 00:00:00 2001 From: Yeicor <4929005+Yeicor@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:45:48 +0200 Subject: [PATCH] Add labels to negative axes, as requested in #173 --- frontend/tools/OrientationGizmo.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/tools/OrientationGizmo.vue b/frontend/tools/OrientationGizmo.vue index c0c21de..dcbad7d 100644 --- a/frontend/tools/OrientationGizmo.vue +++ b/frontend/tools/OrientationGizmo.vue @@ -17,9 +17,13 @@ function createGizmo(expectedParent: HTMLElement, scene: ModelScene): HTMLElemen let gizmo = new OrientationGizmoRaw.default(scene.camera, { size: expectedParent.clientWidth, bubbleSizePrimary: expectedParent.clientWidth / 12, - bubbleSizeSeconday: expectedParent.clientWidth / 14, - fontSize: (expectedParent.clientWidth / 10) + "px" + bubbleSizeSeconday: expectedParent.clientWidth / 12, + fontSize: (expectedParent.clientWidth / 10) + "px", }); + // Make sure all bubbles are labeled + for (let bubble of gizmo.bubbles) { + bubble.label = bubble.axis.toUpperCase(); + } // HACK: Swap axes to fake the CAD orientation for (let swap of [["y", "-z"], ["z", "-y"], ["z", "-z"]]) { let indexA = gizmo.bubbles.findIndex((bubble: any) => bubble.axis == swap[0])