diff --git a/front/src/assets/sidebar.scss b/front/src/assets/sidebar.scss
index b61baac..20eaf6e 100644
--- a/front/src/assets/sidebar.scss
+++ b/front/src/assets/sidebar.scss
@@ -55,9 +55,6 @@ $boxShadow: 0px 0px 8px rgba(0, 0, 0, .25);
}
&-content {
- max-height: 50vh;
- overflow: auto;
-
background-color: $bg;
border-top-left-radius: 0.5rem;
border-bottom-left-radius: 0.5rem;
@@ -70,6 +67,7 @@ $boxShadow: 0px 0px 8px rgba(0, 0, 0, .25);
padding: 1.125rem 1rem;
border-bottom: 2px solid var(--primary-color);
max-height: 4rem;
+ overflow: hidden;
transition: max-height 300ms linear;
&:last-child {
diff --git a/front/src/components/Promo/load_models.vue b/front/src/components/Promo/load_models.vue
index 3de0425..8a90b0e 100644
--- a/front/src/components/Promo/load_models.vue
+++ b/front/src/components/Promo/load_models.vue
@@ -93,9 +93,12 @@ const loadModels = async () => {
(controls.value as any)._needsUpdate = true;
(controls.value as any).update()
- const sidebar_items = [] as PromoScene[]
+ const sidebar_clickable = [] as PromoScene[]
+ const sidebar_visible = [] as PromoScene[]
clickable_items.value = []
+ sidebar_scene.setName({ name: raw_data.name, description: raw_data.name })
+
loading_store.status = 'model'
for (let index = 0; index < data.length; index++) {
loading_store.count = index
@@ -105,6 +108,7 @@ const loadModels = async () => {
item.modelUrl = `${IMAGE_URL}/${element.model_file}`
let { scene: loaded_scene } = await useGLTF(item.modelUrl)
item.modelFile = loaded_scene
+ item.id = element.id
item.name = element.name
if (!element.is_enabled) {
@@ -126,7 +130,12 @@ const loadModels = async () => {
const res = await fetch(`${SERVER_URL}/api/obj/clickable/?source=${element.id}`)
const clickable_areas = await res.json()
clickable.list.push(...clickable_areas)
+
+ if (!element.can_not_disable) {
+ sidebar_visible.push(element)
+ }
}
+ sidebar_scene.setVisible(sidebar_visible)
let c = new Color()
if (envVars.clear_color) {
@@ -195,15 +204,15 @@ const loadModels = async () => {
clickable_items.value.push(point)
clickable_refs.value.push(ref(`${element.id}_clickable`))
- sidebar_items.push({
+ sidebar_clickable.push({
+ is_enabled: true,
id: element.id,
name: element.name
})
}
}
- sidebar_scene.name = raw_data.name;
- sidebar_scene.setData(sidebar_items)
+ sidebar_scene.setClickable(sidebar_clickable)
loading_store.status = 'boxes'
const box = new Box3();
@@ -385,7 +394,8 @@ onUnmounted(() => {