@geode/opengeodeweb-front 10.44.0-rc.9 → 10.44.1-rc.1
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/ClippingPlaneCard.vue +18 -1
- package/app/components/ClippingPlanes.vue +21 -10
- package/app/components/CrsSelector.vue +2 -1
- package/app/components/ExtensionSelector.vue +8 -7
- package/app/components/FactorFilterPanel.vue +4 -4
- package/app/components/MissingFilesSelector.vue +2 -1
- package/app/components/ObjectSelector.vue +4 -3
- package/app/components/Screenshot.vue +8 -57
- package/app/components/ThresholdCard.vue +6 -5
- package/app/components/ThresholdFilter.vue +11 -10
- package/app/components/TimeSeriesTargetSelector.vue +10 -7
- package/app/components/Viewer/ContextMenu/CircularItems.vue +1 -2
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +7 -6
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +4 -5
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -10
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +72 -63
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +76 -71
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +72 -63
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +54 -45
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +76 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +72 -67
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +29 -21
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +15 -7
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +13 -6
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +19 -11
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +17 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +2 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +29 -21
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -3
- package/app/components/Viewer/Options/AttributeSelector.vue +11 -7
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -13
- package/app/components/Viewer/Options/TextureItem.vue +5 -4
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -8
- package/app/components/Viewer/Options/TimeStepSlider.vue +3 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +6 -13
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +40 -38
- package/app/components/Viewer/Scene/BackgroundOptions.vue +37 -0
- package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +48 -0
- package/app/components/Viewer/Scene/TextOptions.vue +63 -0
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +69 -65
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Surface/PolygonsColoring.vue +73 -71
- package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -6
- package/app/composables/attribute_coloring_style.ts +17 -12
- package/app/composables/attribute_selector.ts +9 -15
- package/app/composables/batch_style.ts +25 -16
- package/app/composables/batch_style_model.ts +6 -5
- package/app/composables/clipping_planes_widget.ts +2 -5
- package/app/composables/clipping_planes_widget_entries.ts +1 -0
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +17 -16
- package/app/composables/live_data_item.ts +3 -2
- package/app/composables/model_attribute_style.ts +2 -1
- package/app/composables/model_menu_context.ts +3 -4
- package/app/composables/model_tree.ts +3 -2
- package/app/composables/project_manager_helpers/types.ts +10 -4
- package/app/composables/tree_filter.ts +3 -3
- package/app/composables/tree_keyboard_nav.ts +1 -6
- package/app/composables/tree_scroll.ts +2 -0
- package/app/composables/use_overlapping_picker.ts +12 -10
- package/app/composables/viewer_context_menu.ts +9 -1
- package/app/stores/basemap_helpers/georeferenced.ts +1 -1
- package/app/stores/basemap_helpers/viewer.ts +2 -1
- package/app/stores/crs.ts +6 -5
- package/app/stores/data.ts +84 -69
- package/app/stores/data_helpers/collections.ts +13 -21
- package/app/stores/data_helpers/mesh.ts +19 -24
- package/app/stores/data_helpers/relations.ts +12 -12
- package/app/stores/data_style.ts +34 -20
- package/app/stores/menu.ts +24 -11
- package/app/stores/menu_helpers/menus_data.ts +2 -0
- package/app/stores/menu_helpers/scene.ts +10 -0
- package/app/stores/treeview.ts +28 -27
- package/app/types/attribute.ts +37 -0
- package/app/types/identifiers.ts +72 -0
- package/app/types/style.ts +13 -0
- package/app/types/texture.ts +6 -0
- package/app/types/tree.ts +17 -0
- package/app/utils/attribute_range.ts +2 -1
- package/app/utils/attributes.ts +13 -4
- package/app/utils/basemap_tree.ts +3 -5
- package/app/utils/clipping_planes.ts +25 -5
- package/app/utils/clipping_planes_scene.ts +4 -3
- package/app/utils/crs.ts +4 -1
- package/app/utils/default_styles/constants.ts +18 -1
- package/app/utils/default_styles/index.ts +17 -1
- package/app/utils/default_styles/mesh_components.ts +21 -25
- package/app/utils/default_styles/meshes.ts +7 -22
- package/app/utils/default_styles/model_components.ts +22 -26
- package/app/utils/default_styles/models.ts +11 -13
- package/app/utils/import_workflow.ts +37 -29
- package/app/utils/legacy_data_id.ts +16 -0
- package/app/utils/slice.ts +7 -2
- package/app/utils/threshold.ts +1 -8
- package/app/utils/threshold_sources.ts +8 -5
- package/app/utils/treeview.ts +3 -2
- package/internal/database/base_database.ts +2 -0
- package/internal/database/tables/data.ts +1 -1
- package/internal/database/tables/data_style.ts +1 -1
- package/internal/database/tables/model_components.ts +1 -1
- package/internal/database/tables/model_components_relation.ts +1 -1
- package/internal/database/tables/scene_style.ts +6 -0
- package/internal/stores/data_style/attribute_default.ts +14 -0
- package/internal/stores/data_style/attribute_types.ts +59 -0
- package/internal/stores/data_style/attribute_valid.ts +16 -0
- package/internal/stores/data_style/mesh/base_style.ts +17 -15
- package/internal/stores/data_style/mesh/cells/cell.ts +64 -49
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/cells/cell_config.ts +59 -53
- package/internal/stores/data_style/mesh/cells/color.ts +8 -7
- package/internal/stores/data_style/mesh/cells/common.ts +16 -15
- package/internal/stores/data_style/mesh/cells/index.ts +49 -47
- package/internal/stores/data_style/mesh/cells/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/cells/textures.ts +8 -7
- package/internal/stores/data_style/mesh/cells/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/cells/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/color.ts +8 -7
- package/internal/stores/data_style/mesh/edges/common.ts +13 -12
- package/internal/stores/data_style/mesh/edges/edge.ts +64 -49
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/edges/edge_config.ts +59 -53
- package/internal/stores/data_style/mesh/edges/index.ts +49 -47
- package/internal/stores/data_style/mesh/edges/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/edges/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/edges/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/width.ts +9 -7
- package/internal/stores/data_style/mesh/index.ts +27 -24
- package/internal/stores/data_style/mesh/points/color.ts +8 -7
- package/internal/stores/data_style/mesh/points/common.ts +16 -14
- package/internal/stores/data_style/mesh/points/index.ts +39 -37
- package/internal/stores/data_style/mesh/points/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/points/size.ts +9 -7
- package/internal/stores/data_style/mesh/points/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/points/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/points/visibility.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/color.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/common.ts +19 -15
- package/internal/stores/data_style/mesh/polygons/index.ts +49 -50
- package/internal/stores/data_style/mesh/polygons/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polygons/polygon.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/textures.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/visibility.ts +12 -7
- package/internal/stores/data_style/mesh/polyhedra/color.ts +13 -9
- package/internal/stores/data_style/mesh/polyhedra/common.ts +13 -12
- package/internal/stores/data_style/mesh/polyhedra/index.ts +51 -51
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +59 -53
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +46 -69
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +65 -55
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +12 -7
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +11 -12
- package/internal/stores/data_style/model/blocks/color.ts +25 -26
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/blocks/common.ts +26 -22
- package/internal/stores/data_style/model/blocks/index.ts +8 -7
- package/internal/stores/data_style/model/blocks/polyhedron.ts +114 -135
- package/internal/stores/data_style/model/blocks/vertex.ts +110 -132
- package/internal/stores/data_style/model/blocks/visibility.ts +11 -9
- package/internal/stores/data_style/model/color.ts +55 -41
- package/internal/stores/data_style/model/common.ts +16 -14
- package/internal/stores/data_style/model/component_style.ts +0 -16
- package/internal/stores/data_style/model/corners/color.ts +21 -19
- package/internal/stores/data_style/model/corners/common.ts +26 -22
- package/internal/stores/data_style/model/corners/index.ts +21 -24
- package/internal/stores/data_style/model/corners/vertex.ts +103 -122
- package/internal/stores/data_style/model/corners/visibility.ts +11 -9
- package/internal/stores/data_style/model/edges/common.ts +7 -6
- package/internal/stores/data_style/model/edges/component.ts +63 -55
- package/internal/stores/data_style/model/edges/visibility.ts +24 -16
- package/internal/stores/data_style/model/edges/width.ts +10 -8
- package/internal/stores/data_style/model/index.ts +7 -6
- package/internal/stores/data_style/model/lines/apply_coloring.ts +11 -9
- package/internal/stores/data_style/model/lines/color.ts +25 -23
- package/internal/stores/data_style/model/lines/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/lines/common.ts +29 -21
- package/internal/stores/data_style/model/lines/edge.ts +109 -128
- package/internal/stores/data_style/model/lines/index.ts +8 -7
- package/internal/stores/data_style/model/lines/vertex.ts +109 -128
- package/internal/stores/data_style/model/lines/visibility.ts +11 -9
- package/internal/stores/data_style/model/points/common.ts +7 -6
- package/internal/stores/data_style/model/points/component.ts +62 -54
- package/internal/stores/data_style/model/points/index.ts +12 -7
- package/internal/stores/data_style/model/points/size.ts +10 -8
- package/internal/stores/data_style/model/points/visibility.ts +13 -8
- package/internal/stores/data_style/model/selection.ts +6 -11
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +11 -15
- package/internal/stores/data_style/model/surfaces/color.ts +31 -23
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/surfaces/common.ts +26 -22
- package/internal/stores/data_style/model/surfaces/index.ts +8 -7
- package/internal/stores/data_style/model/surfaces/polygon.ts +113 -138
- package/internal/stores/data_style/model/surfaces/vertex.ts +117 -133
- package/internal/stores/data_style/model/surfaces/visibility.ts +11 -9
- package/internal/stores/data_style/model/visibility.ts +18 -16
- package/internal/stores/data_style/model/visibility_dispatch.ts +4 -4
- package/internal/stores/data_style/scene.ts +118 -0
- package/internal/stores/data_style/state.ts +11 -6
- package/internal/stores/data_style/state_shared.ts +20 -11
- package/internal/stores/data_style/time_step.ts +21 -15
- package/internal/stores/data_style/types.ts +28 -4
- package/internal/stores/hybrid_viewer/camera.ts +11 -6
- package/internal/stores/hybrid_viewer/filters.ts +16 -14
- package/internal/stores/hybrid_viewer/highlight.ts +6 -5
- package/internal/stores/hybrid_viewer/scene.ts +20 -18
- package/internal/stores/hybrid_viewer/vtk_types.ts +2 -2
- package/internal/utils/api_fetch.ts +1 -1
- package/internal/utils/upload_file.ts +1 -7
- package/package.json +1 -1
- package/shared/utils/fetch_raw.ts +7 -8
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// oxlint-disable eslint/max-lines
|
|
3
|
+
import type {
|
|
4
|
+
AttributeItem,
|
|
5
|
+
AttributeName,
|
|
6
|
+
AttributeRange,
|
|
7
|
+
AttributeTimeStep,
|
|
8
|
+
} from "@ogw_front/types/attribute";
|
|
9
|
+
import type { BlockId } from "@ogw_front/types/identifiers";
|
|
3
10
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
4
11
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
5
12
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
13
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
6
14
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
15
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
8
16
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -10,7 +18,7 @@ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
|
10
18
|
|
|
11
19
|
interface Props {
|
|
12
20
|
modelId: string;
|
|
13
|
-
blockId?:
|
|
21
|
+
blockId?: BlockId;
|
|
14
22
|
targetBlockIds: string[];
|
|
15
23
|
collections?: CollectionComponent[];
|
|
16
24
|
activeTab?: string;
|
|
@@ -34,7 +42,7 @@ const referenceBlockId = computed<string | undefined>(() =>
|
|
|
34
42
|
const blockComponentIds = computed<string[]>(() => (blockId !== undefined && [blockId]) || []);
|
|
35
43
|
|
|
36
44
|
// Visibility
|
|
37
|
-
const blocksVisibility = computed<
|
|
45
|
+
const blocksVisibility = computed<Visibility>({
|
|
38
46
|
get: () => {
|
|
39
47
|
if (collections) {
|
|
40
48
|
return targetBlockIds.every((id) => dataStyleStore.modelBlockVisibility(modelId, id));
|
|
@@ -47,7 +55,7 @@ const blocksVisibility = computed<boolean>({
|
|
|
47
55
|
},
|
|
48
56
|
});
|
|
49
57
|
|
|
50
|
-
const blockVisibility = computed<
|
|
58
|
+
const blockVisibility = computed<Visibility | undefined>({
|
|
51
59
|
get: () => dataStyleStore.modelBlockVisibility(modelId, blockId) as boolean | undefined,
|
|
52
60
|
set: async (newValue) => {
|
|
53
61
|
if (newValue === undefined || blockId === undefined) {
|
|
@@ -116,7 +124,7 @@ const blockActiveColoring = computed<string | undefined>({
|
|
|
116
124
|
});
|
|
117
125
|
|
|
118
126
|
// Group Attributes
|
|
119
|
-
const blocksVertexAttributeName = computed<
|
|
127
|
+
const blocksVertexAttributeName = computed<AttributeName | undefined>({
|
|
120
128
|
get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, referenceBlockId.value),
|
|
121
129
|
set: async (newValue) => {
|
|
122
130
|
if (newValue === undefined) {
|
|
@@ -127,7 +135,7 @@ const blocksVertexAttributeName = computed<string | undefined>({
|
|
|
127
135
|
},
|
|
128
136
|
});
|
|
129
137
|
|
|
130
|
-
const blocksVertexAttributeTimeStep = computed<
|
|
138
|
+
const blocksVertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
131
139
|
get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, referenceBlockId.value),
|
|
132
140
|
set: async (newValue) => {
|
|
133
141
|
if (newValue === undefined) {
|
|
@@ -138,7 +146,7 @@ const blocksVertexAttributeTimeStep = computed<number | undefined>({
|
|
|
138
146
|
},
|
|
139
147
|
});
|
|
140
148
|
|
|
141
|
-
const blocksVertexAttributeItem = computed<
|
|
149
|
+
const blocksVertexAttributeItem = computed<AttributeItem>({
|
|
142
150
|
get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, referenceBlockId.value),
|
|
143
151
|
set: async (newValue) => {
|
|
144
152
|
await dataStyleStore.setModelBlocksVertexAttributeItem(modelId, targetBlockIds, newValue);
|
|
@@ -146,7 +154,7 @@ const blocksVertexAttributeItem = computed<string | undefined>({
|
|
|
146
154
|
},
|
|
147
155
|
});
|
|
148
156
|
|
|
149
|
-
const blocksVertexAttributeRange = computed<
|
|
157
|
+
const blocksVertexAttributeRange = computed<AttributeRange>({
|
|
150
158
|
get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, referenceBlockId.value),
|
|
151
159
|
set: async (newValue) => {
|
|
152
160
|
const [minimum, maximum] = newValue;
|
|
@@ -183,7 +191,7 @@ const blocksVertexAttributeNoDataColor = computed<RGBAColor>({
|
|
|
183
191
|
},
|
|
184
192
|
});
|
|
185
193
|
|
|
186
|
-
const blocksPolyhedronAttributeName = computed<
|
|
194
|
+
const blocksPolyhedronAttributeName = computed<AttributeName | undefined>({
|
|
187
195
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, referenceBlockId.value),
|
|
188
196
|
set: async (newValue) => {
|
|
189
197
|
if (newValue === undefined) {
|
|
@@ -200,7 +208,7 @@ const blocksPolyhedronAttributeName = computed<string | undefined>({
|
|
|
200
208
|
},
|
|
201
209
|
});
|
|
202
210
|
|
|
203
|
-
const blocksPolyhedronAttributeTimeStep = computed<
|
|
211
|
+
const blocksPolyhedronAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
204
212
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, referenceBlockId.value),
|
|
205
213
|
set: async (newValue) => {
|
|
206
214
|
if (newValue === undefined) {
|
|
@@ -217,7 +225,7 @@ const blocksPolyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
217
225
|
},
|
|
218
226
|
});
|
|
219
227
|
|
|
220
|
-
const blocksPolyhedronAttributeItem = computed<
|
|
228
|
+
const blocksPolyhedronAttributeItem = computed<AttributeItem>({
|
|
221
229
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, referenceBlockId.value),
|
|
222
230
|
set: async (newValue) => {
|
|
223
231
|
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
@@ -231,7 +239,7 @@ const blocksPolyhedronAttributeItem = computed<string | undefined>({
|
|
|
231
239
|
},
|
|
232
240
|
});
|
|
233
241
|
|
|
234
|
-
const blocksPolyhedronAttributeRange = computed<
|
|
242
|
+
const blocksPolyhedronAttributeRange = computed<AttributeRange>({
|
|
235
243
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, referenceBlockId.value),
|
|
236
244
|
set: async (newValue) => {
|
|
237
245
|
const [minimum, maximum] = newValue;
|
|
@@ -280,7 +288,7 @@ const blocksPolyhedronAttributeNoDataColor = computed<RGBAColor>({
|
|
|
280
288
|
});
|
|
281
289
|
|
|
282
290
|
// Individual Attributes
|
|
283
|
-
const vertexAttributeName = computed<
|
|
291
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
284
292
|
get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, blockId),
|
|
285
293
|
set: async (newValue) => {
|
|
286
294
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -291,7 +299,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
291
299
|
},
|
|
292
300
|
});
|
|
293
301
|
|
|
294
|
-
const vertexAttributeTimeStep = computed<
|
|
302
|
+
const vertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
295
303
|
get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, blockId),
|
|
296
304
|
set: async (newValue) => {
|
|
297
305
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -302,7 +310,7 @@ const vertexAttributeTimeStep = computed<number | undefined>({
|
|
|
302
310
|
},
|
|
303
311
|
});
|
|
304
312
|
|
|
305
|
-
const vertexAttributeItem = computed<
|
|
313
|
+
const vertexAttributeItem = computed<AttributeItem>({
|
|
306
314
|
get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, blockId),
|
|
307
315
|
set: async (newValue) => {
|
|
308
316
|
if (blockId === undefined) {
|
|
@@ -313,7 +321,7 @@ const vertexAttributeItem = computed<string | undefined>({
|
|
|
313
321
|
},
|
|
314
322
|
});
|
|
315
323
|
|
|
316
|
-
const vertexAttributeRange = computed<
|
|
324
|
+
const vertexAttributeRange = computed<AttributeRange>({
|
|
317
325
|
get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, blockId),
|
|
318
326
|
set: async (newValue) => {
|
|
319
327
|
const [minimum, maximum] = newValue;
|
|
@@ -347,7 +355,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor>({
|
|
|
347
355
|
},
|
|
348
356
|
});
|
|
349
357
|
|
|
350
|
-
const polyhedronAttributeName = computed<
|
|
358
|
+
const polyhedronAttributeName = computed<AttributeName | undefined>({
|
|
351
359
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, blockId),
|
|
352
360
|
set: async (newValue) => {
|
|
353
361
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -364,7 +372,7 @@ const polyhedronAttributeName = computed<string | undefined>({
|
|
|
364
372
|
},
|
|
365
373
|
});
|
|
366
374
|
|
|
367
|
-
const polyhedronAttributeTimeStep = computed<
|
|
375
|
+
const polyhedronAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
368
376
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, blockId),
|
|
369
377
|
set: async (newValue) => {
|
|
370
378
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -381,7 +389,7 @@ const polyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
381
389
|
},
|
|
382
390
|
});
|
|
383
391
|
|
|
384
|
-
const polyhedronAttributeItem = computed<
|
|
392
|
+
const polyhedronAttributeItem = computed<AttributeItem>({
|
|
385
393
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, blockId),
|
|
386
394
|
set: async (newValue) => {
|
|
387
395
|
if (blockId === undefined) {
|
|
@@ -398,7 +406,7 @@ const polyhedronAttributeItem = computed<string | undefined>({
|
|
|
398
406
|
},
|
|
399
407
|
});
|
|
400
408
|
|
|
401
|
-
const polyhedronAttributeRange = computed<
|
|
409
|
+
const polyhedronAttributeRange = computed<AttributeRange>({
|
|
402
410
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, blockId),
|
|
403
411
|
set: async (newValue) => {
|
|
404
412
|
const [minimum, maximum] = newValue;
|
|
@@ -478,7 +486,7 @@ const attributeSchemas = {
|
|
|
478
486
|
<div v-show="!activeTab || activeTab === 'type'" data-testid="modelComponentTypeOptions">
|
|
479
487
|
<VisibilitySwitch data-testid="modelBlocksVisibilitySwitch" v-model="blocksVisibility" />
|
|
480
488
|
<ViewerOptionsColoringTypeSelector
|
|
481
|
-
:id="modelId"
|
|
489
|
+
:data-id="modelId"
|
|
482
490
|
:componentIds="targetBlockIds"
|
|
483
491
|
v-model:coloring_style_key="blocksActiveColoring"
|
|
484
492
|
v-model:color="blocksColor"
|
|
@@ -507,7 +515,7 @@ const attributeSchemas = {
|
|
|
507
515
|
>
|
|
508
516
|
<VisibilitySwitch v-model="blockVisibility" />
|
|
509
517
|
<ViewerOptionsColoringTypeSelector
|
|
510
|
-
:id="modelId"
|
|
518
|
+
:data-id="modelId"
|
|
511
519
|
:componentIds="blockComponentIds"
|
|
512
520
|
v-model:coloring_style_key="blockActiveColoring"
|
|
513
521
|
v-model:color="blockColor"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { AttributeColorMap, AttributeItem, AttributeName } from "@ogw_front/types/attribute";
|
|
3
|
+
import type { Visibility, Width } from "@ogw_front/types/style";
|
|
2
4
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
5
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
4
6
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -86,7 +88,7 @@ async function applyEdgesStyle(
|
|
|
86
88
|
hybridViewerStore.remoteRender();
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
const visibility = computed<
|
|
91
|
+
const visibility = computed<Visibility | undefined>({
|
|
90
92
|
get: () => edgesStyle.value?.visibility(modelId, referenceComponentId),
|
|
91
93
|
set: async (newValue) => {
|
|
92
94
|
if (newValue === undefined) {
|
|
@@ -96,7 +98,7 @@ const visibility = computed<boolean | undefined>({
|
|
|
96
98
|
},
|
|
97
99
|
});
|
|
98
100
|
|
|
99
|
-
const width = computed<
|
|
101
|
+
const width = computed<Width | undefined>({
|
|
100
102
|
get: () => edgesStyle.value?.width(modelId, referenceComponentId),
|
|
101
103
|
set: async (newValue) => {
|
|
102
104
|
if (newValue === undefined) {
|
|
@@ -126,7 +128,7 @@ const color = computed<RGBAColor | undefined>({
|
|
|
126
128
|
},
|
|
127
129
|
});
|
|
128
130
|
|
|
129
|
-
const vertexAttributeName = computed<
|
|
131
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
130
132
|
get: () => edgesStyle.value?.vertexAttributeName(modelId, referenceComponentId),
|
|
131
133
|
set: async (newValue) => {
|
|
132
134
|
if (newValue === undefined) {
|
|
@@ -136,7 +138,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
136
138
|
},
|
|
137
139
|
});
|
|
138
140
|
|
|
139
|
-
const vertexAttributeItem = computed<
|
|
141
|
+
const vertexAttributeItem = computed<AttributeItem | undefined>({
|
|
140
142
|
get: () => edgesStyle.value?.vertexAttributeItem(modelId, referenceComponentId),
|
|
141
143
|
set: async (newValue) => {
|
|
142
144
|
if (newValue === undefined) {
|
|
@@ -162,7 +164,7 @@ const vertexAttributeRange = computed<(number | undefined)[] | undefined>({
|
|
|
162
164
|
},
|
|
163
165
|
});
|
|
164
166
|
|
|
165
|
-
const vertexAttributeColorMap = computed<
|
|
167
|
+
const vertexAttributeColorMap = computed<AttributeColorMap | undefined>({
|
|
166
168
|
get: () => edgesStyle.value?.vertexAttributeColorMap(modelId, referenceComponentId),
|
|
167
169
|
set: async (newValue) => {
|
|
168
170
|
await applyEdgesStyle((style, ids) => style.setVertexAttributeColorMap(modelId, ids, newValue));
|
|
@@ -206,7 +208,7 @@ const attributeSchemas = {
|
|
|
206
208
|
<template v-if="visibility">
|
|
207
209
|
<ViewerOptionsWidthSlider data-testid="modelComponentEdgesWidthSlider" v-model="width" />
|
|
208
210
|
<ViewerOptionsColoringTypeSelector
|
|
209
|
-
:id="modelId"
|
|
211
|
+
:data-id="modelId"
|
|
210
212
|
:componentIds="allComponentIds"
|
|
211
213
|
v-model:coloring_style_key="activeColoring"
|
|
212
214
|
v-model:color="color"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { AttributeColorMap, AttributeItem, AttributeName } from "@ogw_front/types/attribute";
|
|
3
|
+
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
2
4
|
import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
3
5
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
6
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
@@ -106,7 +108,7 @@ async function applyPointsStyle(
|
|
|
106
108
|
hybridViewerStore.remoteRender();
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
const visibility = computed<
|
|
111
|
+
const visibility = computed<Visibility | undefined>({
|
|
110
112
|
get: () => pointsStyle.value?.visibility(modelId, referenceComponentId),
|
|
111
113
|
set: async (newValue) => {
|
|
112
114
|
if (newValue === undefined) {
|
|
@@ -116,7 +118,7 @@ const visibility = computed<boolean | undefined>({
|
|
|
116
118
|
},
|
|
117
119
|
});
|
|
118
120
|
|
|
119
|
-
const size = computed<
|
|
121
|
+
const size = computed<Size | undefined>({
|
|
120
122
|
get: () => pointsStyle.value?.size(modelId, referenceComponentId),
|
|
121
123
|
set: async (newValue) => {
|
|
122
124
|
if (newValue === undefined) {
|
|
@@ -146,7 +148,7 @@ const color = computed<RGBAColor | undefined>({
|
|
|
146
148
|
},
|
|
147
149
|
});
|
|
148
150
|
|
|
149
|
-
const vertexAttributeName = computed<
|
|
151
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
150
152
|
get: () => pointsStyle.value?.vertexAttributeName(modelId, referenceComponentId),
|
|
151
153
|
set: async (newValue) => {
|
|
152
154
|
if (newValue === undefined) {
|
|
@@ -156,7 +158,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
156
158
|
},
|
|
157
159
|
});
|
|
158
160
|
|
|
159
|
-
const vertexAttributeItem = computed<
|
|
161
|
+
const vertexAttributeItem = computed<AttributeItem | undefined>({
|
|
160
162
|
get: () => pointsStyle.value?.vertexAttributeItem(modelId, referenceComponentId),
|
|
161
163
|
set: async (newValue) => {
|
|
162
164
|
if (newValue === undefined) {
|
|
@@ -182,7 +184,7 @@ const vertexAttributeRange = computed<(number | undefined)[] | undefined>({
|
|
|
182
184
|
},
|
|
183
185
|
});
|
|
184
186
|
|
|
185
|
-
const vertexAttributeColorMap = computed<
|
|
187
|
+
const vertexAttributeColorMap = computed<AttributeColorMap | undefined>({
|
|
186
188
|
get: () => pointsStyle.value?.vertexAttributeColorMap(modelId, referenceComponentId),
|
|
187
189
|
set: async (newValue) => {
|
|
188
190
|
await applyPointsStyle((style, ids) =>
|
|
@@ -212,7 +214,7 @@ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
|
|
|
212
214
|
<template v-if="visibility">
|
|
213
215
|
<ViewerOptionsSizeSlider data-testid="modelComponentPointsSizeSlider" v-model="size" />
|
|
214
216
|
<ViewerOptionsColoringTypeSelector
|
|
215
|
-
:id="modelId"
|
|
217
|
+
:data-id="modelId"
|
|
216
218
|
:componentIds="allComponentIds"
|
|
217
219
|
v-model:coloring_style_key="activeColoring"
|
|
218
220
|
v-model:color="color"
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
AttributeTimeStep,
|
|
7
|
+
} from "@ogw_front/types/attribute";
|
|
8
|
+
import type { CornerId } from "@ogw_front/types/identifiers";
|
|
2
9
|
import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
3
10
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
11
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
5
13
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
6
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
15
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
16
|
|
|
9
17
|
interface Props {
|
|
10
18
|
modelId: string;
|
|
11
|
-
cornerId?:
|
|
19
|
+
cornerId?: CornerId;
|
|
12
20
|
activeTab?: string;
|
|
13
21
|
}
|
|
14
22
|
|
|
@@ -19,7 +27,7 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
19
27
|
|
|
20
28
|
const cornerComponentIds = computed<string[]>(() => (cornerId !== undefined && [cornerId]) || []);
|
|
21
29
|
|
|
22
|
-
const cornerVisibility = computed<
|
|
30
|
+
const cornerVisibility = computed<Visibility | undefined>({
|
|
23
31
|
get: () => dataStyleStore.modelCornerVisibility(modelId, cornerId) as boolean | undefined,
|
|
24
32
|
set: async (newValue) => {
|
|
25
33
|
if (newValue === undefined || cornerId === undefined) {
|
|
@@ -53,7 +61,7 @@ const cornerActiveColoring = computed<string | undefined>({
|
|
|
53
61
|
});
|
|
54
62
|
|
|
55
63
|
// Individual Attributes
|
|
56
|
-
const vertexAttributeName = computed<
|
|
64
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
57
65
|
get: () => dataStyleStore.modelCornersVertexAttributeName(modelId, cornerId),
|
|
58
66
|
set: async (newValue) => {
|
|
59
67
|
if (cornerId === undefined || newValue === undefined) {
|
|
@@ -64,7 +72,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
64
72
|
},
|
|
65
73
|
});
|
|
66
74
|
|
|
67
|
-
const vertexAttributeTimeStep = computed<
|
|
75
|
+
const vertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
68
76
|
get: () => dataStyleStore.modelCornersVertexAttributeTimeStep(modelId, cornerId),
|
|
69
77
|
set: async (newValue) => {
|
|
70
78
|
if (cornerId === undefined || newValue === undefined) {
|
|
@@ -75,7 +83,7 @@ const vertexAttributeTimeStep = computed<number | undefined>({
|
|
|
75
83
|
},
|
|
76
84
|
});
|
|
77
85
|
|
|
78
|
-
const vertexAttributeItem = computed<
|
|
86
|
+
const vertexAttributeItem = computed<AttributeItem>({
|
|
79
87
|
get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, cornerId),
|
|
80
88
|
set: async (newValue) => {
|
|
81
89
|
if (cornerId === undefined) {
|
|
@@ -86,7 +94,7 @@ const vertexAttributeItem = computed<string | undefined>({
|
|
|
86
94
|
},
|
|
87
95
|
});
|
|
88
96
|
|
|
89
|
-
const vertexAttributeRange = computed<
|
|
97
|
+
const vertexAttributeRange = computed<AttributeRange>({
|
|
90
98
|
get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId, cornerId),
|
|
91
99
|
set: async (newValue) => {
|
|
92
100
|
const [minimum, maximum] = newValue;
|
|
@@ -127,7 +135,7 @@ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
|
|
|
127
135
|
<div v-show="!activeTab || activeTab === 'component'" data-testid="modelComponentOptions">
|
|
128
136
|
<VisibilitySwitch v-model="cornerVisibility" />
|
|
129
137
|
<ViewerOptionsColoringTypeSelector
|
|
130
|
-
:id="modelId"
|
|
138
|
+
:data-id="modelId"
|
|
131
139
|
:componentIds="cornerComponentIds"
|
|
132
140
|
v-model:coloring_style_key="cornerActiveColoring"
|
|
133
141
|
v-model:color="cornerColor"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
3
|
+
import type { CornerId } from "@ogw_front/types/identifiers";
|
|
3
4
|
import ViewerGenericModelCornerComponentOptions from "@ogw_front/components/Viewer/Generic/Model/CornerComponentOptions.vue";
|
|
4
5
|
import ViewerGenericModelCornersTypeOptions from "@ogw_front/components/Viewer/Generic/Model/CornersTypeOptions.vue";
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
modelId: string;
|
|
8
|
-
cornerId?:
|
|
9
|
+
cornerId?: CornerId;
|
|
9
10
|
targetCornerIds: string[];
|
|
10
11
|
collections?: CollectionComponent[];
|
|
11
12
|
activeTab?: string;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
AttributeTimeStep,
|
|
7
|
+
} from "@ogw_front/types/attribute";
|
|
2
8
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
3
9
|
import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
4
10
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
5
11
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
6
13
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
15
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -29,7 +36,7 @@ const referenceCornerId = computed<string | undefined>(() =>
|
|
|
29
36
|
);
|
|
30
37
|
|
|
31
38
|
// Visibility
|
|
32
|
-
const cornersVisibility = computed<
|
|
39
|
+
const cornersVisibility = computed<Visibility>({
|
|
33
40
|
get: () => {
|
|
34
41
|
if (collections) {
|
|
35
42
|
return targetCornerIds.every((id) => dataStyleStore.modelCornerVisibility(modelId, id));
|
|
@@ -80,7 +87,7 @@ const cornersActiveColoring = computed<string | undefined>({
|
|
|
80
87
|
});
|
|
81
88
|
|
|
82
89
|
// Group Attributes
|
|
83
|
-
const cornersVertexAttributeName = computed<
|
|
90
|
+
const cornersVertexAttributeName = computed<AttributeName | undefined>({
|
|
84
91
|
get: () => dataStyleStore.modelCornersVertexAttributeName(modelId, referenceCornerId.value),
|
|
85
92
|
set: async (newValue) => {
|
|
86
93
|
if (newValue === undefined) {
|
|
@@ -91,7 +98,7 @@ const cornersVertexAttributeName = computed<string | undefined>({
|
|
|
91
98
|
},
|
|
92
99
|
});
|
|
93
100
|
|
|
94
|
-
const cornersVertexAttributeTimeStep = computed<
|
|
101
|
+
const cornersVertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
95
102
|
get: () => dataStyleStore.modelCornersVertexAttributeTimeStep(modelId, referenceCornerId.value),
|
|
96
103
|
set: async (newValue) => {
|
|
97
104
|
if (newValue === undefined) {
|
|
@@ -102,7 +109,7 @@ const cornersVertexAttributeTimeStep = computed<number | undefined>({
|
|
|
102
109
|
},
|
|
103
110
|
});
|
|
104
111
|
|
|
105
|
-
const cornersVertexAttributeItem = computed<
|
|
112
|
+
const cornersVertexAttributeItem = computed<AttributeItem>({
|
|
106
113
|
get: () => dataStyleStore.modelCornersVertexAttributeItem(modelId, referenceCornerId.value),
|
|
107
114
|
set: async (newValue) => {
|
|
108
115
|
await dataStyleStore.setModelCornersVertexAttributeItem(modelId, targetCornerIds, newValue);
|
|
@@ -110,7 +117,7 @@ const cornersVertexAttributeItem = computed<string | undefined>({
|
|
|
110
117
|
},
|
|
111
118
|
});
|
|
112
119
|
|
|
113
|
-
const cornersVertexAttributeRange = computed<
|
|
120
|
+
const cornersVertexAttributeRange = computed<AttributeRange>({
|
|
114
121
|
get: () => dataStyleStore.modelCornersVertexAttributeRange(modelId, referenceCornerId.value),
|
|
115
122
|
set: async (newValue) => {
|
|
116
123
|
const [minimum, maximum] = newValue;
|
|
@@ -155,7 +162,7 @@ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
|
|
|
155
162
|
<div v-show="!activeTab || activeTab === 'type'" data-testid="modelComponentTypeOptions">
|
|
156
163
|
<VisibilitySwitch data-testid="modelCornersVisibilitySwitch" v-model="cornersVisibility" />
|
|
157
164
|
<ViewerOptionsColoringTypeSelector
|
|
158
|
-
:id="modelId"
|
|
165
|
+
:data-id="modelId"
|
|
159
166
|
:componentIds="targetCornerIds"
|
|
160
167
|
v-model:coloring_style_key="cornersActiveColoring"
|
|
161
168
|
v-model:color="cornersColor"
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
AttributeTimeStep,
|
|
7
|
+
} from "@ogw_front/types/attribute";
|
|
8
|
+
import type { LineId } from "@ogw_front/types/identifiers";
|
|
2
9
|
import { MODEL_LINE_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
3
10
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
11
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
5
13
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
6
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
15
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
16
|
|
|
9
17
|
interface Props {
|
|
10
18
|
modelId: string;
|
|
11
|
-
lineId?:
|
|
19
|
+
lineId?: LineId;
|
|
12
20
|
activeTab?: string;
|
|
13
21
|
}
|
|
14
22
|
|
|
@@ -19,7 +27,7 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
19
27
|
|
|
20
28
|
const lineComponentIds = computed<string[]>(() => (lineId !== undefined && [lineId]) || []);
|
|
21
29
|
|
|
22
|
-
const lineVisibility = computed<
|
|
30
|
+
const lineVisibility = computed<Visibility | undefined>({
|
|
23
31
|
get: () => dataStyleStore.modelLineVisibility(modelId, lineId) as boolean | undefined,
|
|
24
32
|
set: async (newValue) => {
|
|
25
33
|
if (newValue === undefined || lineId === undefined) {
|
|
@@ -53,7 +61,7 @@ const lineActiveColoring = computed<string | undefined>({
|
|
|
53
61
|
});
|
|
54
62
|
|
|
55
63
|
// Individual Attributes
|
|
56
|
-
const vertexAttributeName = computed<
|
|
64
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
57
65
|
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, lineId),
|
|
58
66
|
set: async (newValue) => {
|
|
59
67
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -64,7 +72,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
64
72
|
},
|
|
65
73
|
});
|
|
66
74
|
|
|
67
|
-
const vertexAttributeTimeStep = computed<
|
|
75
|
+
const vertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
68
76
|
get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, lineId),
|
|
69
77
|
set: async (newValue) => {
|
|
70
78
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -75,7 +83,7 @@ const vertexAttributeTimeStep = computed<number | undefined>({
|
|
|
75
83
|
},
|
|
76
84
|
});
|
|
77
85
|
|
|
78
|
-
const vertexAttributeItem = computed<
|
|
86
|
+
const vertexAttributeItem = computed<AttributeItem>({
|
|
79
87
|
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, lineId),
|
|
80
88
|
set: async (newValue) => {
|
|
81
89
|
if (lineId === undefined) {
|
|
@@ -86,7 +94,7 @@ const vertexAttributeItem = computed<string | undefined>({
|
|
|
86
94
|
},
|
|
87
95
|
});
|
|
88
96
|
|
|
89
|
-
const vertexAttributeRange = computed<
|
|
97
|
+
const vertexAttributeRange = computed<AttributeRange>({
|
|
90
98
|
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, lineId),
|
|
91
99
|
set: async (newValue) => {
|
|
92
100
|
const [minimum, maximum] = newValue;
|
|
@@ -120,7 +128,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor>({
|
|
|
120
128
|
},
|
|
121
129
|
});
|
|
122
130
|
|
|
123
|
-
const edgeAttributeName = computed<
|
|
131
|
+
const edgeAttributeName = computed<AttributeName | undefined>({
|
|
124
132
|
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, lineId),
|
|
125
133
|
set: async (newValue) => {
|
|
126
134
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -131,7 +139,7 @@ const edgeAttributeName = computed<string | undefined>({
|
|
|
131
139
|
},
|
|
132
140
|
});
|
|
133
141
|
|
|
134
|
-
const edgeAttributeTimeStep = computed<
|
|
142
|
+
const edgeAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
135
143
|
get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, lineId),
|
|
136
144
|
set: async (newValue) => {
|
|
137
145
|
if (lineId === undefined || newValue === undefined) {
|
|
@@ -142,7 +150,7 @@ const edgeAttributeTimeStep = computed<number | undefined>({
|
|
|
142
150
|
},
|
|
143
151
|
});
|
|
144
152
|
|
|
145
|
-
const edgeAttributeItem = computed<
|
|
153
|
+
const edgeAttributeItem = computed<AttributeItem>({
|
|
146
154
|
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, lineId),
|
|
147
155
|
set: async (newValue) => {
|
|
148
156
|
if (lineId === undefined) {
|
|
@@ -153,7 +161,7 @@ const edgeAttributeItem = computed<string | undefined>({
|
|
|
153
161
|
},
|
|
154
162
|
});
|
|
155
163
|
|
|
156
|
-
const edgeAttributeRange = computed<
|
|
164
|
+
const edgeAttributeRange = computed<AttributeRange>({
|
|
157
165
|
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, lineId),
|
|
158
166
|
set: async (newValue) => {
|
|
159
167
|
const [minimum, maximum] = newValue;
|
|
@@ -194,7 +202,7 @@ const { capabilities, schemas: attributeSchemas } = MODEL_LINE_COLORING;
|
|
|
194
202
|
<div v-show="!activeTab || activeTab === 'component'" data-testid="modelComponentOptions">
|
|
195
203
|
<VisibilitySwitch v-model="lineVisibility" />
|
|
196
204
|
<ViewerOptionsColoringTypeSelector
|
|
197
|
-
:id="modelId"
|
|
205
|
+
:data-id="modelId"
|
|
198
206
|
:componentIds="lineComponentIds"
|
|
199
207
|
v-model:coloring_style_key="lineActiveColoring"
|
|
200
208
|
v-model:color="lineColor"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
3
|
+
import type { LineId } from "@ogw_front/types/identifiers";
|
|
3
4
|
import ViewerGenericModelLineComponentOptions from "@ogw_front/components/Viewer/Generic/Model/LineComponentOptions.vue";
|
|
4
5
|
import ViewerGenericModelLinesTypeOptions from "@ogw_front/components/Viewer/Generic/Model/LinesTypeOptions.vue";
|
|
5
6
|
|
|
6
7
|
interface Props {
|
|
7
8
|
modelId: string;
|
|
8
|
-
lineId?:
|
|
9
|
+
lineId?: LineId;
|
|
9
10
|
targetLineIds: string[];
|
|
10
11
|
collections?: CollectionComponent[];
|
|
11
12
|
activeTab?: string;
|