diff --git a/app/components/Viewer/Generic/Model/BlocksOptions.vue b/app/components/Viewer/Generic/Model/BlocksOptions.vue
index 465c7df0..a83c20a6 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;
+}
+
function getAttributes() {
- if (schema.properties.component_id && componentId === undefined) {
+ const requiresComponent = schema.properties.component_ids !== undefined;
+ if (requiresComponent && !hasSelectedComponent(componentIds)) {
return;
}
+
const params = { id };
- if (componentId !== undefined) {
- params.component_id = componentId;
+ if (requiresComponent) {
+ params.component_ids = componentIds;
}
+
backStore.request(
{ schema, params },
{
@@ -87,7 +94,7 @@ onMounted(() => {
});
watch(
- () => [id, componentId, schema],
+ () => [id, componentIds, schema],
() => {
getAttributes();
},
diff --git a/app/components/Viewer/Options/ColoringTypeSelector.vue b/app/components/Viewer/Options/ColoringTypeSelector.vue
index 212aeebf..0d15ef57 100644
--- a/app/components/Viewer/Options/ColoringTypeSelector.vue
+++ b/app/components/Viewer/Options/ColoringTypeSelector.vue
@@ -36,9 +36,9 @@ const polyhedron_attribute_color_map = defineModel("polyhedron_attribute_color_m
type: String,
});
-const { id, componentId, capabilities, schemas, allowRandom } = defineProps({
+const { id, componentIds, capabilities, schemas, allowRandom } = defineProps({
id: { type: String, required: true },
- componentId: { type: String, default: undefined },
+ componentIds: { type: Array, default: undefined },
capabilities: {
type: Object,
default: () => ({}),
@@ -215,7 +215,7 @@ watch(
v-model:attributeRange="vertex_attribute_range"
v-model:attributeColorMap="vertex_attribute_color_map"
:id="id"
- :componentId="componentId"
+ :componentIds="componentIds"
:schema="vertexSchema"
/>
@@ -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"
/>