bx-1316-refactoring #14

Merged
ksenia_mikhailova merged 46 commits from bx-1316-refactoring into dev 2024-08-28 15:06:52 +03:00
2 changed files with 8 additions and 3 deletions
Showing only changes of commit 3d5346fa74 - Show all commits

View File

@ -279,7 +279,10 @@ watch(() => sidebar, () => {
el.getWorldPosition(target_vector); el.getWorldPosition(target_vector);
target_vector.y = 0; target_vector.y = 0;
(controls.value as any).target = target_vector; (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 }) }, { deep: true })

View File

@ -16,11 +16,13 @@ const openedChange = () => {
sidebar.open(opened_desc.value) sidebar.open(opened_desc.value)
} }
watch(() => sidebar.$state.is_open, () => { watch(() => sidebar, () => {
if (sidebar.is_open == false) { if (sidebar.is_open == false) {
opened_desc.value = null opened_desc.value = null
} else {
opened_desc.value = sidebar.id_clickable
} }
}) }, { deep: true })
</script> </script>
<template> <template>
<div class="sidebar" :class="[{ 'open': sidebar.is_open }]" ref="sidebar_obj"> <div class="sidebar" :class="[{ 'open': sidebar.is_open }]" ref="sidebar_obj">