From a443b947f8a7b49ec18db3c88ee758916641815a Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Tue, 4 Aug 2026 12:02:55 +0200 Subject: [PATCH 1/5] fix(modelComponentsAttributes): Attribute support for multiple ids of components --- .../Viewer/Generic/Model/BlocksOptions.vue | 2 +- .../Viewer/Generic/Model/CornersOptions.vue | 2 +- .../Viewer/Generic/Model/LinesOptions.vue | 2 +- .../Viewer/Generic/Model/SurfacesOptions.vue | 2 +- .../Viewer/Options/AttributeSelector.vue | 21 +++++++++++++++---- .../Viewer/Options/ColoringTypeSelector.vue | 2 +- 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/app/components/Viewer/Generic/Model/BlocksOptions.vue b/app/components/Viewer/Generic/Model/BlocksOptions.vue index 465c7df0..fac97f0d 100644 --- a/app/components/Viewer/Generic/Model/BlocksOptions.vue +++ b/app/components/Viewer/Generic/Model/BlocksOptions.vue @@ -238,7 +238,7 @@ const polyhedronSchema = back_schemas.opengeodeweb_back.model_component_polyhedr 0; + } + return true; +} + function getAttributes() { - if (schema.properties.component_id && componentId === undefined) { + const requiresComponent = schema.properties.component_ids !== undefined; + if (requiresComponent && !hasSelectedComponent(componentId)) { return; } + const params = { id }; - if (componentId !== undefined) { - params.component_id = componentId; + if (requiresComponent) { + params.component_ids = Array.isArray(componentId) ? componentId : [componentId]; } + backStore.request( { schema, params }, { diff --git a/app/components/Viewer/Options/ColoringTypeSelector.vue b/app/components/Viewer/Options/ColoringTypeSelector.vue index 212aeebf..46ee99ff 100644 --- a/app/components/Viewer/Options/ColoringTypeSelector.vue +++ b/app/components/Viewer/Options/ColoringTypeSelector.vue @@ -38,7 +38,7 @@ const polyhedron_attribute_color_map = defineModel("polyhedron_attribute_color_m const { id, componentId, capabilities, schemas, allowRandom } = defineProps({ id: { type: String, required: true }, - componentId: { type: String, default: undefined }, + componentId: { type: [String, Array], default: undefined }, capabilities: { type: Object, default: () => ({}), From 5c1a7c3139f8fbd83c370c216d1e242375a6d536 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Tue, 4 Aug 2026 12:14:15 +0200 Subject: [PATCH 2/5] trigger From 0a6f10e04244197c02d5dbb1490d2c31f2df7356 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Tue, 4 Aug 2026 13:53:41 +0200 Subject: [PATCH 3/5] data-testId --- app/components/Viewer/ObjectTree/Base/CommonTreeView.vue | 1 + app/components/Viewer/ObjectTree/Base/TreeRow.vue | 1 + app/components/Viewer/ObjectTree/Views/GlobalObjects.vue | 3 +++ 3 files changed, 5 insertions(+) diff --git a/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue b/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue index 2c3608cb..31e4d24d 100644 --- a/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +++ b/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue @@ -142,6 +142,7 @@ const { focusedIndex, handleKeyDown } = useTreeKeyboardNav( > @@ -226,7 +226,7 @@ watch( v-model:attributeRange="edge_attribute_range" v-model:attributeColorMap="edge_attribute_color_map" :id="id" - :componentId="componentId" + :componentIds="componentIds" :schema="edgeSchema" /> @@ -237,7 +237,7 @@ watch( v-model:attributeRange="cell_attribute_range" v-model:attributeColorMap="cell_attribute_color_map" :id="id" - :componentId="componentId" + :componentIds="componentIds" :schema="cellSchema" /> @@ -248,7 +248,7 @@ watch( v-model:attributeRange="polygon_attribute_range" v-model:attributeColorMap="polygon_attribute_color_map" :id="id" - :componentId="componentId" + :componentIds="componentIds" :schema="polygonSchema" /> @@ -259,7 +259,7 @@ watch( v-model:attributeRange="polyhedron_attribute_range" v-model:attributeColorMap="polyhedron_attribute_color_map" :id="id" - :componentId="componentId" + :componentIds="componentIds" :schema="polyhedronSchema" />