diff --git a/front/src/components/Promo/load_models.vue b/front/src/components/Promo/load_models.vue index 689437b..dd1361c 100644 --- a/front/src/components/Promo/load_models.vue +++ b/front/src/components/Promo/load_models.vue @@ -279,7 +279,10 @@ watch(() => sidebar, () => { el.getWorldPosition(target_vector); target_vector.y = 0; (controls.value as any).target = target_vector; - camera.value?.position.set(30, 30, 30) + camera.value?.position.set(30, 30, 30); + (controls.value as any)._needsUpdate = true; + (controls.value as any).update() + // camera.value?.rotation.set(0,0,1) } } }, { deep: true }) diff --git a/front/src/components/Promo/sidebar.vue b/front/src/components/Promo/sidebar.vue index b517fe8..f45d091 100644 --- a/front/src/components/Promo/sidebar.vue +++ b/front/src/components/Promo/sidebar.vue @@ -16,11 +16,13 @@ const openedChange = () => { sidebar.open(opened_desc.value) } -watch(() => sidebar.$state.is_open, () => { +watch(() => sidebar, () => { if (sidebar.is_open == false) { opened_desc.value = null + } else { + opened_desc.value = sidebar.id_clickable } -}) +}, { deep: true })