@geode/opengeodeweb-front 10.28.1-rc.4 → 10.29.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/Viewer/ContextMenu/InfoCard.vue +56 -21
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +21 -0
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +21 -0
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +80 -0
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +10 -0
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +81 -0
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +20 -0
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +36 -0
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +18 -0
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +36 -0
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +36 -0
- package/app/components/Viewer/Options/AttributeSelector.vue +47 -38
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +26 -22
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +10 -0
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +20 -0
- package/app/components/Viewer/Surface/PolygonsOptions.vue +20 -0
- package/internal/stores/data_style/mesh/cells/cell.js +94 -60
- package/internal/stores/data_style/mesh/cells/index.js +21 -22
- package/internal/stores/data_style/mesh/cells/vertex.js +83 -64
- package/internal/stores/data_style/mesh/edges/edge.js +83 -67
- package/internal/stores/data_style/mesh/edges/index.js +22 -19
- package/internal/stores/data_style/mesh/edges/vertex.js +87 -65
- package/internal/stores/data_style/mesh/points/index.js +9 -9
- package/internal/stores/data_style/mesh/points/vertex.js +96 -99
- package/internal/stores/data_style/mesh/polygons/index.js +26 -16
- package/internal/stores/data_style/mesh/polygons/polygon.js +88 -66
- package/internal/stores/data_style/mesh/polygons/vertex.js +88 -66
- package/internal/stores/data_style/mesh/polyhedra/index.js +33 -22
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +101 -103
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +101 -103
- package/internal/stores/data_style/model/blocks/color.js +27 -28
- package/internal/stores/data_style/model/blocks/index.js +140 -72
- package/internal/stores/data_style/model/blocks/polyhedron.js +114 -58
- package/internal/stores/data_style/model/blocks/vertex.js +107 -57
- package/internal/stores/data_style/model/common.js +6 -6
- package/internal/stores/data_style/model/corners/color.js +12 -16
- package/internal/stores/data_style/model/corners/index.js +95 -63
- package/internal/stores/data_style/model/corners/vertex.js +108 -58
- package/internal/stores/data_style/model/lines/color.js +18 -23
- package/internal/stores/data_style/model/lines/edge.js +106 -54
- package/internal/stores/data_style/model/lines/index.js +132 -71
- package/internal/stores/data_style/model/lines/vertex.js +107 -54
- package/internal/stores/data_style/model/surfaces/color.js +24 -32
- package/internal/stores/data_style/model/surfaces/index.js +142 -74
- package/internal/stores/data_style/model/surfaces/polygon.js +114 -58
- package/internal/stores/data_style/model/surfaces/vertex.js +114 -58
- package/internal/stores/data_style/state.js +105 -94
- package/package.json +1 -1
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +200 -24
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +132 -34
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +60 -11
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +116 -22
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +145 -34
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +206 -33
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +94 -15
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +187 -30
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +379 -31
|
@@ -74,6 +74,14 @@ const linesVertexAttributeName = computed({
|
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
const linesVertexAttributeItem = computed({
|
|
78
|
+
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, targetLineIds[0]),
|
|
79
|
+
set: async (newValue) => {
|
|
80
|
+
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, targetLineIds, newValue);
|
|
81
|
+
hybridViewerStore.remoteRender();
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
77
85
|
const linesVertexAttributeRange = computed({
|
|
78
86
|
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, targetLineIds[0]),
|
|
79
87
|
set: async (newValue) => {
|
|
@@ -103,6 +111,14 @@ const linesEdgeAttributeName = computed({
|
|
|
103
111
|
},
|
|
104
112
|
});
|
|
105
113
|
|
|
114
|
+
const linesEdgeAttributeItem = computed({
|
|
115
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, targetLineIds[0]),
|
|
116
|
+
set: async (newValue) => {
|
|
117
|
+
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, targetLineIds, newValue);
|
|
118
|
+
hybridViewerStore.remoteRender();
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
|
|
106
122
|
const linesEdgeAttributeRange = computed({
|
|
107
123
|
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, targetLineIds[0]),
|
|
108
124
|
set: async (newValue) => {
|
|
@@ -133,6 +149,14 @@ const vertexAttributeName = computed({
|
|
|
133
149
|
},
|
|
134
150
|
});
|
|
135
151
|
|
|
152
|
+
const vertexAttributeItem = computed({
|
|
153
|
+
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, lineId),
|
|
154
|
+
set: async (newValue) => {
|
|
155
|
+
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, [lineId], newValue);
|
|
156
|
+
hybridViewerStore.remoteRender();
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
|
|
136
160
|
const vertexAttributeRange = computed({
|
|
137
161
|
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, lineId),
|
|
138
162
|
set: async (newValue) => {
|
|
@@ -162,6 +186,14 @@ const edgeAttributeName = computed({
|
|
|
162
186
|
},
|
|
163
187
|
});
|
|
164
188
|
|
|
189
|
+
const edgeAttributeItem = computed({
|
|
190
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, lineId),
|
|
191
|
+
set: async (newValue) => {
|
|
192
|
+
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, [lineId], newValue);
|
|
193
|
+
hybridViewerStore.remoteRender();
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
165
197
|
const edgeAttributeRange = computed({
|
|
166
198
|
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, lineId),
|
|
167
199
|
set: async (newValue) => {
|
|
@@ -206,9 +238,11 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
|
|
|
206
238
|
v-model:coloring_style_key="linesActiveColoring"
|
|
207
239
|
v-model:color="linesColor"
|
|
208
240
|
v-model:vertex_attribute_name="linesVertexAttributeName"
|
|
241
|
+
v-model:vertex_attribute_item="linesVertexAttributeItem"
|
|
209
242
|
v-model:vertex_attribute_range="linesVertexAttributeRange"
|
|
210
243
|
v-model:vertex_attribute_color_map="linesVertexAttributeColorMap"
|
|
211
244
|
v-model:edge_attribute_name="linesEdgeAttributeName"
|
|
245
|
+
v-model:edge_attribute_item="linesEdgeAttributeItem"
|
|
212
246
|
v-model:edge_attribute_range="linesEdgeAttributeRange"
|
|
213
247
|
v-model:edge_attribute_color_map="linesEdgeAttributeColorMap"
|
|
214
248
|
:capabilities="capabilities"
|
|
@@ -225,9 +259,11 @@ const edgeSchema = back_schemas.opengeodeweb_back.model_component_edge_attribute
|
|
|
225
259
|
v-model:coloring_style_key="lineActiveColoring"
|
|
226
260
|
v-model:color="lineColor"
|
|
227
261
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
262
|
+
v-model:vertex_attribute_item="vertexAttributeItem"
|
|
228
263
|
v-model:vertex_attribute_range="vertexAttributeRange"
|
|
229
264
|
v-model:vertex_attribute_color_map="vertexAttributeColorMap"
|
|
230
265
|
v-model:edge_attribute_name="edgeAttributeName"
|
|
266
|
+
v-model:edge_attribute_item="edgeAttributeItem"
|
|
231
267
|
v-model:edge_attribute_range="edgeAttributeRange"
|
|
232
268
|
v-model:edge_attribute_color_map="edgeAttributeColorMap"
|
|
233
269
|
:capabilities="capabilities"
|
|
@@ -74,6 +74,14 @@ const surfacesVertexAttributeName = computed({
|
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
const surfacesVertexAttributeItem = computed({
|
|
78
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeItem(modelId, targetSurfaceIds[0]),
|
|
79
|
+
set: async (newValue) => {
|
|
80
|
+
await dataStyleStore.setModelSurfacesVertexAttributeItem(modelId, targetSurfaceIds, newValue);
|
|
81
|
+
hybridViewerStore.remoteRender();
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
|
|
77
85
|
const surfacesVertexAttributeRange = computed({
|
|
78
86
|
get: () => dataStyleStore.modelSurfacesVertexAttributeRange(modelId, targetSurfaceIds[0]),
|
|
79
87
|
set: async (newValue) => {
|
|
@@ -107,6 +115,14 @@ const surfacesPolygonAttributeName = computed({
|
|
|
107
115
|
},
|
|
108
116
|
});
|
|
109
117
|
|
|
118
|
+
const surfacesPolygonAttributeItem = computed({
|
|
119
|
+
get: () => dataStyleStore.modelSurfacesPolygonAttributeItem(modelId, targetSurfaceIds[0]),
|
|
120
|
+
set: async (newValue) => {
|
|
121
|
+
await dataStyleStore.setModelSurfacesPolygonAttributeItem(modelId, targetSurfaceIds, newValue);
|
|
122
|
+
hybridViewerStore.remoteRender();
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
|
|
110
126
|
const surfacesPolygonAttributeRange = computed({
|
|
111
127
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeRange(modelId, targetSurfaceIds[0]),
|
|
112
128
|
set: async (newValue) => {
|
|
@@ -141,6 +157,14 @@ const vertexAttributeName = computed({
|
|
|
141
157
|
},
|
|
142
158
|
});
|
|
143
159
|
|
|
160
|
+
const vertexAttributeItem = computed({
|
|
161
|
+
get: () => dataStyleStore.modelSurfacesVertexAttributeItem(modelId, surfaceId),
|
|
162
|
+
set: async (newValue) => {
|
|
163
|
+
await dataStyleStore.setModelSurfacesVertexAttributeItem(modelId, [surfaceId], newValue);
|
|
164
|
+
hybridViewerStore.remoteRender();
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
|
|
144
168
|
const vertexAttributeRange = computed({
|
|
145
169
|
get: () => dataStyleStore.modelSurfacesVertexAttributeRange(modelId, surfaceId),
|
|
146
170
|
set: async (newValue) => {
|
|
@@ -170,6 +194,14 @@ const polygonAttributeName = computed({
|
|
|
170
194
|
},
|
|
171
195
|
});
|
|
172
196
|
|
|
197
|
+
const polygonAttributeItem = computed({
|
|
198
|
+
get: () => dataStyleStore.modelSurfacesPolygonAttributeItem(modelId, surfaceId),
|
|
199
|
+
set: async (newValue) => {
|
|
200
|
+
await dataStyleStore.setModelSurfacesPolygonAttributeItem(modelId, [surfaceId], newValue);
|
|
201
|
+
hybridViewerStore.remoteRender();
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
|
|
173
205
|
const polygonAttributeRange = computed({
|
|
174
206
|
get: () => dataStyleStore.modelSurfacesPolygonAttributeRange(modelId, surfaceId),
|
|
175
207
|
set: async (newValue) => {
|
|
@@ -214,9 +246,11 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
|
|
|
214
246
|
v-model:coloring_style_key="surfacesActiveColoring"
|
|
215
247
|
v-model:color="surfacesColor"
|
|
216
248
|
v-model:vertex_attribute_name="surfacesVertexAttributeName"
|
|
249
|
+
v-model:vertex_attribute_item="surfacesVertexAttributeItem"
|
|
217
250
|
v-model:vertex_attribute_range="surfacesVertexAttributeRange"
|
|
218
251
|
v-model:vertex_attribute_color_map="surfacesVertexAttributeColorMap"
|
|
219
252
|
v-model:polygon_attribute_name="surfacesPolygonAttributeName"
|
|
253
|
+
v-model:polygon_attribute_item="surfacesPolygonAttributeItem"
|
|
220
254
|
v-model:polygon_attribute_range="surfacesPolygonAttributeRange"
|
|
221
255
|
v-model:polygon_attribute_color_map="surfacesPolygonAttributeColorMap"
|
|
222
256
|
:capabilities="capabilities"
|
|
@@ -233,9 +267,11 @@ const polygonSchema = back_schemas.opengeodeweb_back.model_component_polygon_att
|
|
|
233
267
|
v-model:coloring_style_key="surfaceActiveColoring"
|
|
234
268
|
v-model:color="surfaceColor"
|
|
235
269
|
v-model:vertex_attribute_name="vertexAttributeName"
|
|
270
|
+
v-model:vertex_attribute_item="vertexAttributeItem"
|
|
236
271
|
v-model:vertex_attribute_range="vertexAttributeRange"
|
|
237
272
|
v-model:vertex_attribute_color_map="vertexAttributeColorMap"
|
|
238
273
|
v-model:polygon_attribute_name="polygonAttributeName"
|
|
274
|
+
v-model:polygon_attribute_item="polygonAttributeItem"
|
|
239
275
|
v-model:polygon_attribute_range="polygonAttributeRange"
|
|
240
276
|
v-model:polygon_attribute_color_map="polygonAttributeColorMap"
|
|
241
277
|
:capabilities="capabilities"
|
|
@@ -4,14 +4,10 @@ import { useBackStore } from "@ogw_front/stores/back";
|
|
|
4
4
|
|
|
5
5
|
const backStore = useBackStore();
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const range = defineModel("range", { type: Array });
|
|
14
|
-
const colorMap = defineModel("colorMap", { type: String });
|
|
7
|
+
const attributeName = defineModel("attributeName", { type: String });
|
|
8
|
+
const attributeItem = defineModel("attributeItem", { type: Number });
|
|
9
|
+
const attributeRange = defineModel("attributeRange", { type: Array });
|
|
10
|
+
const attributeColorMap = defineModel("attributeColorMap", { type: String });
|
|
15
11
|
|
|
16
12
|
const { id, componentId, schema } = defineProps({
|
|
17
13
|
id: { type: String, required: true },
|
|
@@ -22,40 +18,54 @@ const { id, componentId, schema } = defineProps({
|
|
|
22
18
|
const attributes = ref([]);
|
|
23
19
|
|
|
24
20
|
const rangeMin = computed({
|
|
25
|
-
get: () => (
|
|
21
|
+
get: () => (attributeRange.value ? attributeRange.value[0] : undefined),
|
|
26
22
|
set: (val) => {
|
|
27
|
-
const currentMax =
|
|
23
|
+
const currentMax = attributeRange.value ? attributeRange.value[1] : undefined;
|
|
28
24
|
let newMin = val;
|
|
29
25
|
if (currentMax !== undefined && val > currentMax) {
|
|
30
26
|
newMin = currentMax;
|
|
31
27
|
}
|
|
32
|
-
|
|
28
|
+
attributeRange.value = [newMin, currentMax];
|
|
33
29
|
},
|
|
34
30
|
});
|
|
35
31
|
const rangeMax = computed({
|
|
36
|
-
get: () => (
|
|
32
|
+
get: () => (attributeRange.value ? attributeRange.value[1] : undefined),
|
|
37
33
|
set: (val) => {
|
|
38
|
-
const currentMin =
|
|
34
|
+
const currentMin = attributeRange.value ? attributeRange.value[0] : undefined;
|
|
39
35
|
let newMax = val;
|
|
40
36
|
if (currentMin !== undefined && val < currentMin) {
|
|
41
37
|
newMax = currentMin;
|
|
42
38
|
}
|
|
43
|
-
|
|
39
|
+
attributeRange.value = [currentMin, newMax];
|
|
44
40
|
},
|
|
45
41
|
});
|
|
46
42
|
|
|
47
43
|
const currentAttribute = computed(() =>
|
|
48
|
-
attributes.value.find((attr) => attr.attribute_name ===
|
|
44
|
+
attributes.value.find((attr) => attr.attribute_name === attributeName.value),
|
|
49
45
|
);
|
|
50
46
|
|
|
47
|
+
const componentItems = computed(() => {
|
|
48
|
+
if (!currentAttribute.value) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
return Array.from({ length: currentAttribute.value.nb_items }, (_, index) => ({
|
|
52
|
+
title: `Item ${index + 1}`,
|
|
53
|
+
value: index,
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
|
|
51
57
|
function resetRange() {
|
|
52
58
|
if (currentAttribute.value) {
|
|
53
|
-
|
|
59
|
+
const comp = attributeItem.value ?? 0;
|
|
60
|
+
attributeRange.value = [
|
|
61
|
+
currentAttribute.value.min_values[comp],
|
|
62
|
+
currentAttribute.value.max_values[comp],
|
|
63
|
+
];
|
|
54
64
|
}
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
function getAttributes() {
|
|
58
|
-
if (schema.properties
|
|
68
|
+
if (schema.properties.component_id && componentId === undefined) {
|
|
59
69
|
return;
|
|
60
70
|
}
|
|
61
71
|
const params = { id };
|
|
@@ -83,24 +93,11 @@ watch(
|
|
|
83
93
|
},
|
|
84
94
|
);
|
|
85
95
|
|
|
86
|
-
watch(
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
attributes.value.length > 0 &&
|
|
92
|
-
(range.value === undefined || range.value[0] === undefined || colorMap.value === undefined)
|
|
93
|
-
) {
|
|
94
|
-
resetRange();
|
|
95
|
-
if (colorMap.value === undefined) {
|
|
96
|
-
colorMap.value = "batlow";
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
watch(name, (newName, oldName) => {
|
|
103
|
-
if (newName !== oldName) {
|
|
96
|
+
watch([attributeName, attributeItem], () => {
|
|
97
|
+
if (attributeColorMap.value === undefined) {
|
|
98
|
+
attributeColorMap.value = "batlow";
|
|
99
|
+
}
|
|
100
|
+
if (!attributeRange.value || attributeRange.value[0] === undefined) {
|
|
104
101
|
resetRange();
|
|
105
102
|
}
|
|
106
103
|
});
|
|
@@ -109,7 +106,7 @@ watch(name, (newName, oldName) => {
|
|
|
109
106
|
<template>
|
|
110
107
|
<v-select
|
|
111
108
|
data-testid="attributeSelector"
|
|
112
|
-
v-model="
|
|
109
|
+
v-model="attributeName"
|
|
113
110
|
:items="attributes.map((attribute) => attribute.attribute_name)"
|
|
114
111
|
item-title="attribute_name"
|
|
115
112
|
item-value="attribute_name"
|
|
@@ -117,11 +114,23 @@ watch(name, (newName, oldName) => {
|
|
|
117
114
|
label="Select an attribute"
|
|
118
115
|
hide-details
|
|
119
116
|
/>
|
|
117
|
+
<v-select
|
|
118
|
+
v-if="currentAttribute && currentAttribute.nb_items > 1"
|
|
119
|
+
data-testid="itemSelector"
|
|
120
|
+
v-model="attributeItem"
|
|
121
|
+
:items="componentItems"
|
|
122
|
+
item-title="title"
|
|
123
|
+
item-value="value"
|
|
124
|
+
density="compact"
|
|
125
|
+
label="Select an item"
|
|
126
|
+
class="mt-3"
|
|
127
|
+
hide-details
|
|
128
|
+
/>
|
|
120
129
|
<ViewerOptionsAttributeColorBar
|
|
121
|
-
v-if="
|
|
130
|
+
v-if="attributeName"
|
|
122
131
|
v-model:minimum="rangeMin"
|
|
123
132
|
v-model:maximum="rangeMax"
|
|
124
|
-
v-model:colorMap="
|
|
133
|
+
v-model:colorMap="attributeColorMap"
|
|
125
134
|
@reset="resetRange"
|
|
126
135
|
/>
|
|
127
136
|
</template>
|
|
@@ -10,34 +10,33 @@ const color = defineModel("color", { type: Object });
|
|
|
10
10
|
const textures = defineModel("textures", { type: Array });
|
|
11
11
|
|
|
12
12
|
const vertex_attribute_name = defineModel("vertex_attribute_name", { type: String });
|
|
13
|
+
const vertex_attribute_item = defineModel("vertex_attribute_item", { type: Number });
|
|
13
14
|
const vertex_attribute_range = defineModel("vertex_attribute_range", { type: Array });
|
|
14
15
|
const vertex_attribute_color_map = defineModel("vertex_attribute_color_map", { type: String });
|
|
15
16
|
|
|
16
17
|
const edge_attribute_name = defineModel("edge_attribute_name", { type: String });
|
|
18
|
+
const edge_attribute_item = defineModel("edge_attribute_item", { type: Number });
|
|
17
19
|
const edge_attribute_range = defineModel("edge_attribute_range", { type: Array });
|
|
18
20
|
const edge_attribute_color_map = defineModel("edge_attribute_color_map", { type: String });
|
|
19
21
|
|
|
20
22
|
const cell_attribute_name = defineModel("cell_attribute_name", { type: String });
|
|
23
|
+
const cell_attribute_item = defineModel("cell_attribute_item", { type: Number });
|
|
21
24
|
const cell_attribute_range = defineModel("cell_attribute_range", { type: Array });
|
|
22
25
|
const cell_attribute_color_map = defineModel("cell_attribute_color_map", { type: String });
|
|
23
26
|
|
|
24
27
|
const polygon_attribute_name = defineModel("polygon_attribute_name", { type: String });
|
|
28
|
+
const polygon_attribute_item = defineModel("polygon_attribute_item", { type: Number });
|
|
25
29
|
const polygon_attribute_range = defineModel("polygon_attribute_range", { type: Array });
|
|
26
30
|
const polygon_attribute_color_map = defineModel("polygon_attribute_color_map", { type: String });
|
|
27
31
|
|
|
28
32
|
const polyhedron_attribute_name = defineModel("polyhedron_attribute_name", { type: String });
|
|
33
|
+
const polyhedron_attribute_item = defineModel("polyhedron_attribute_item", { type: Number });
|
|
29
34
|
const polyhedron_attribute_range = defineModel("polyhedron_attribute_range", { type: Array });
|
|
30
35
|
const polyhedron_attribute_color_map = defineModel("polyhedron_attribute_color_map", {
|
|
31
36
|
type: String,
|
|
32
37
|
});
|
|
33
38
|
|
|
34
|
-
const {
|
|
35
|
-
id,
|
|
36
|
-
componentId,
|
|
37
|
-
capabilities,
|
|
38
|
-
schemas,
|
|
39
|
-
allowRandom = false,
|
|
40
|
-
} = defineProps({
|
|
39
|
+
const { id, componentId, capabilities, schemas, allowRandom } = defineProps({
|
|
41
40
|
id: { type: String, required: true },
|
|
42
41
|
componentId: { type: String, default: undefined },
|
|
43
42
|
capabilities: {
|
|
@@ -211,9 +210,10 @@ watch(
|
|
|
211
210
|
</template>
|
|
212
211
|
<template v-if="active_key === vertex_dict['value'] && hasColorMap('vertex')">
|
|
213
212
|
<ViewerOptionsAttributeSelector
|
|
214
|
-
v-model:
|
|
215
|
-
v-model:
|
|
216
|
-
v-model:
|
|
213
|
+
v-model:attributeName="vertex_attribute_name"
|
|
214
|
+
v-model:attributeItem="vertex_attribute_item"
|
|
215
|
+
v-model:attributeRange="vertex_attribute_range"
|
|
216
|
+
v-model:attributeColorMap="vertex_attribute_color_map"
|
|
217
217
|
:id="id"
|
|
218
218
|
:componentId="componentId"
|
|
219
219
|
:schema="vertexSchema"
|
|
@@ -221,9 +221,10 @@ watch(
|
|
|
221
221
|
</template>
|
|
222
222
|
<template v-if="active_key === edge_dict['value'] && hasColorMap('edge')">
|
|
223
223
|
<ViewerOptionsAttributeSelector
|
|
224
|
-
v-model:
|
|
225
|
-
v-model:
|
|
226
|
-
v-model:
|
|
224
|
+
v-model:attributeName="edge_attribute_name"
|
|
225
|
+
v-model:attributeItem="edge_attribute_item"
|
|
226
|
+
v-model:attributeRange="edge_attribute_range"
|
|
227
|
+
v-model:attributeColorMap="edge_attribute_color_map"
|
|
227
228
|
:id="id"
|
|
228
229
|
:componentId="componentId"
|
|
229
230
|
:schema="edgeSchema"
|
|
@@ -231,9 +232,10 @@ watch(
|
|
|
231
232
|
</template>
|
|
232
233
|
<template v-if="active_key === cell_dict['value'] && hasColorMap('cell')">
|
|
233
234
|
<ViewerOptionsAttributeSelector
|
|
234
|
-
v-model:
|
|
235
|
-
v-model:
|
|
236
|
-
v-model:
|
|
235
|
+
v-model:attributeName="cell_attribute_name"
|
|
236
|
+
v-model:attributeItem="cell_attribute_item"
|
|
237
|
+
v-model:attributeRange="cell_attribute_range"
|
|
238
|
+
v-model:attributeColorMap="cell_attribute_color_map"
|
|
237
239
|
:id="id"
|
|
238
240
|
:componentId="componentId"
|
|
239
241
|
:schema="cellSchema"
|
|
@@ -241,9 +243,10 @@ watch(
|
|
|
241
243
|
</template>
|
|
242
244
|
<template v-if="active_key === polygon_dict['value'] && hasColorMap('polygon')">
|
|
243
245
|
<ViewerOptionsAttributeSelector
|
|
244
|
-
v-model:
|
|
245
|
-
v-model:
|
|
246
|
-
v-model:
|
|
246
|
+
v-model:attributeName="polygon_attribute_name"
|
|
247
|
+
v-model:attributeItem="polygon_attribute_item"
|
|
248
|
+
v-model:attributeRange="polygon_attribute_range"
|
|
249
|
+
v-model:attributeColorMap="polygon_attribute_color_map"
|
|
247
250
|
:id="id"
|
|
248
251
|
:componentId="componentId"
|
|
249
252
|
:schema="polygonSchema"
|
|
@@ -251,9 +254,10 @@ watch(
|
|
|
251
254
|
</template>
|
|
252
255
|
<template v-if="active_key === polyhedron_dict['value'] && hasColorMap('polyhedron')">
|
|
253
256
|
<ViewerOptionsAttributeSelector
|
|
254
|
-
v-model:
|
|
255
|
-
v-model:
|
|
256
|
-
v-model:
|
|
257
|
+
v-model:attributeName="polyhedron_attribute_name"
|
|
258
|
+
v-model:attributeItem="polyhedron_attribute_item"
|
|
259
|
+
v-model:attributeRange="polyhedron_attribute_range"
|
|
260
|
+
v-model:attributeColorMap="polyhedron_attribute_color_map"
|
|
257
261
|
:id="id"
|
|
258
262
|
:componentId="componentId"
|
|
259
263
|
:schema="polyhedronSchema"
|
|
@@ -64,6 +64,15 @@ const vertex_attribute_name = computed({
|
|
|
64
64
|
hybridViewerStore.remoteRender();
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
|
+
const vertex_attribute_item = computed({
|
|
68
|
+
get: () => dataStyleStore.meshPointsVertexAttributeItem(id.value),
|
|
69
|
+
set: async (newValue) => {
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshPointsVertexAttributeItem(targetId, newValue),
|
|
72
|
+
);
|
|
73
|
+
hybridViewerStore.remoteRender();
|
|
74
|
+
},
|
|
75
|
+
});
|
|
67
76
|
const vertex_attribute_range = computed({
|
|
68
77
|
get: () => dataStyleStore.meshPointsVertexAttributeRange(id.value),
|
|
69
78
|
set: async (newValue) => {
|
|
@@ -103,6 +112,7 @@ const vertex_attribute_color_map = computed({
|
|
|
103
112
|
v-model:coloring_style_key="coloring_style_key"
|
|
104
113
|
v-model:color="color"
|
|
105
114
|
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
115
|
+
v-model:vertex_attribute_item="vertex_attribute_item"
|
|
106
116
|
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
107
117
|
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
108
118
|
:vertex_has_colormap="true"
|
|
@@ -55,6 +55,15 @@ const vertex_attribute_name = computed({
|
|
|
55
55
|
hybridViewerStore.remoteRender();
|
|
56
56
|
},
|
|
57
57
|
});
|
|
58
|
+
const vertex_attribute_item = computed({
|
|
59
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(id.value),
|
|
60
|
+
set: async (newValue) => {
|
|
61
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
62
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeItem(targetId, newValue),
|
|
63
|
+
);
|
|
64
|
+
hybridViewerStore.remoteRender();
|
|
65
|
+
},
|
|
66
|
+
});
|
|
58
67
|
const vertex_attribute_range = computed({
|
|
59
68
|
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(id.value),
|
|
60
69
|
set: async (newValue) => {
|
|
@@ -82,6 +91,15 @@ const polyhedron_attribute_name = computed({
|
|
|
82
91
|
hybridViewerStore.remoteRender();
|
|
83
92
|
},
|
|
84
93
|
});
|
|
94
|
+
const polyhedron_attribute_item = computed({
|
|
95
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(id.value),
|
|
96
|
+
set: async (newValue) => {
|
|
97
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
98
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(targetId, newValue),
|
|
99
|
+
);
|
|
100
|
+
hybridViewerStore.remoteRender();
|
|
101
|
+
},
|
|
102
|
+
});
|
|
85
103
|
const polyhedron_attribute_range = computed({
|
|
86
104
|
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(id.value),
|
|
87
105
|
set: async (newValue) => {
|
|
@@ -121,9 +139,11 @@ const polyhedron_attribute_color_map = computed({
|
|
|
121
139
|
v-model:coloring_style_key="coloring_style_key"
|
|
122
140
|
v-model:color="color"
|
|
123
141
|
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
142
|
+
v-model:vertex_attribute_item="vertex_attribute_item"
|
|
124
143
|
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
125
144
|
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
126
145
|
v-model:polyhedron_attribute_name="polyhedron_attribute_name"
|
|
146
|
+
v-model:polyhedron_attribute_item="polyhedron_attribute_item"
|
|
127
147
|
v-model:polyhedron_attribute_range="polyhedron_attribute_range"
|
|
128
148
|
v-model:polyhedron_attribute_color_map="polyhedron_attribute_color_map"
|
|
129
149
|
/>
|
|
@@ -64,6 +64,15 @@ const vertex_attribute_name = computed({
|
|
|
64
64
|
hybridViewerStore.remoteRender();
|
|
65
65
|
},
|
|
66
66
|
});
|
|
67
|
+
const vertex_attribute_item = computed({
|
|
68
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeItem(id.value),
|
|
69
|
+
set: async (newValue) => {
|
|
70
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
71
|
+
dataStyleStore.setMeshPolygonsVertexAttributeItem(targetId, newValue),
|
|
72
|
+
);
|
|
73
|
+
hybridViewerStore.remoteRender();
|
|
74
|
+
},
|
|
75
|
+
});
|
|
67
76
|
const vertex_attribute_range = computed({
|
|
68
77
|
get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id.value),
|
|
69
78
|
set: async (newValue) => {
|
|
@@ -91,6 +100,15 @@ const polygon_attribute_name = computed({
|
|
|
91
100
|
hybridViewerStore.remoteRender();
|
|
92
101
|
},
|
|
93
102
|
});
|
|
103
|
+
const polygon_attribute_item = computed({
|
|
104
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(id.value),
|
|
105
|
+
set: async (newValue) => {
|
|
106
|
+
await applyBatchStyle(id.value, (targetId) =>
|
|
107
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeItem(targetId, newValue),
|
|
108
|
+
);
|
|
109
|
+
hybridViewerStore.remoteRender();
|
|
110
|
+
},
|
|
111
|
+
});
|
|
94
112
|
const polygon_attribute_range = computed({
|
|
95
113
|
get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id.value),
|
|
96
114
|
set: async (newValue) => {
|
|
@@ -130,9 +148,11 @@ const polygon_attribute_color_map = computed({
|
|
|
130
148
|
v-model:color="color"
|
|
131
149
|
v-model:textures="textures"
|
|
132
150
|
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
151
|
+
v-model:vertex_attribute_item="vertex_attribute_item"
|
|
133
152
|
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
134
153
|
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
135
154
|
v-model:polygon_attribute_name="polygon_attribute_name"
|
|
155
|
+
v-model:polygon_attribute_item="polygon_attribute_item"
|
|
136
156
|
v-model:polygon_attribute_range="polygon_attribute_range"
|
|
137
157
|
v-model:polygon_attribute_color_map="polygon_attribute_color_map"
|
|
138
158
|
/>
|