@geode/opengeodeweb-front 10.43.2 → 10.44.0-rc.10
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/.build/server/utils/cleanup.js +7 -2
- package/.build/server/utils/microservices.js +9 -81
- package/.build/server/utils/microservices_process.js +85 -0
- package/.build/server/utils/scripts.js +34 -23
- package/.build/server/utils/typed_handler.js +5 -1
- package/.build/server/utils/ws_client.js +7 -2
- package/.build/shared/utils/fetch_raw.js +2 -2
- package/.build/shared/utils/parse_boolean.js +2 -1
- package/app/assets/geode_objects.ts +1 -0
- package/app/components/BasemapAttribution.vue +28 -0
- package/app/components/ClippingPlanes.vue +22 -78
- package/app/components/CrsSelector.vue +53 -46
- package/app/components/DragAndDrop.vue +16 -79
- package/app/components/FeedBack/Snackers.vue +27 -0
- package/app/components/FileSelector.vue +9 -6
- package/app/components/HybridViewerTooltip.vue +8 -2
- package/app/components/MissingFilesSelector.vue +40 -23
- package/app/components/ObjectSelector.vue +34 -20
- package/app/components/ProjectCrs.vue +37 -0
- package/app/components/Screenshot.vue +17 -59
- package/app/components/ThresholdCard.vue +205 -0
- package/app/components/ThresholdFilter.vue +81 -216
- package/app/components/ViewToolbar.vue +15 -231
- package/app/components/Viewer/Basemap/CropOptions.vue +50 -0
- package/app/components/Viewer/Basemap/OpacityOptions.vue +52 -0
- package/app/components/Viewer/ContextMenu/CircularItems.vue +1 -2
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +11 -6
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -7
- package/app/components/Viewer/ContextMenu/InfoCard.vue +30 -0
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +209 -0
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +3 -191
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +221 -0
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +3 -210
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +211 -0
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -192
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +13 -0
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +227 -0
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +3 -215
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +221 -0
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +3 -203
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +14 -12
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +2 -18
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +145 -0
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +15 -294
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +173 -0
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +218 -0
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +15 -427
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +229 -0
- package/app/components/Viewer/Generic/Model/ModelCardTabs.vue +35 -0
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +34 -25
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +34 -25
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +17 -5
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -12
- package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +4 -1
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +71 -1
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +55 -10
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +11 -4
- package/app/components/Viewer/Options/AttributeSelector.vue +40 -136
- package/app/components/Viewer/Options/ColorPicker.vue +4 -1
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +48 -74
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +13 -7
- package/app/components/Viewer/Options/NoDataColorInfo.vue +56 -0
- package/app/components/Viewer/Options/Sliders/Opacity.vue +22 -0
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +13 -0
- 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 +217 -0
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +4 -199
- package/app/components/Viewer/Surface/PolygonsColoring.vue +224 -0
- package/app/components/Viewer/Surface/PolygonsOptions.vue +3 -213
- package/app/components/Viewer/Ui.vue +9 -0
- package/app/components/csv-preview/CsvPreviewer.vue +4 -1
- package/app/composables/attribute_coloring_style.ts +8 -2
- package/app/composables/attribute_selector.ts +126 -0
- package/app/composables/batch_style_model.ts +34 -0
- package/app/composables/clipping_slices.ts +166 -0
- package/app/composables/global_attribute_style.ts +4 -3
- package/app/composables/hover_highlight.ts +19 -18
- package/app/composables/live_data_item.ts +39 -0
- package/app/composables/model_tabs.ts +86 -0
- package/app/composables/overlapping_picker_menu.ts +43 -0
- package/app/composables/project_manager.ts +5 -81
- package/app/composables/project_manager_helpers/reset.ts +34 -0
- package/app/composables/project_manager_helpers/restore.ts +67 -0
- package/app/composables/project_manager_helpers/types.ts +24 -0
- package/app/composables/project_manager_helpers/viewer_session.ts +25 -0
- package/app/composables/stepper_tree.ts +10 -2
- package/app/composables/tree_filter.ts +11 -2
- package/app/composables/tree_keyboard_nav.ts +4 -2
- package/app/composables/use_overlapping_picker.ts +30 -42
- package/app/composables/view_toolbar_options.ts +126 -0
- package/app/composables/view_toolbar_tool_options.ts +115 -0
- package/app/composables/view_toolbar_tools.ts +108 -0
- package/app/composables/viewer_context_menu.ts +19 -1
- package/app/composables/virtual_tree.ts +20 -131
- package/app/composables/virtual_tree_flatten.ts +109 -0
- package/app/composables/virtual_tree_types.ts +81 -0
- package/app/stores/app.ts +8 -55
- package/app/stores/app_helpers/extension.ts +90 -51
- package/app/stores/app_helpers/registry.ts +69 -0
- package/app/stores/basemap.ts +52 -0
- package/app/stores/basemap_detail.ts +51 -0
- package/app/stores/basemap_helpers/builds.ts +158 -0
- package/app/stores/basemap_helpers/detail_layers.ts +72 -0
- package/app/stores/basemap_helpers/detail_map.ts +62 -0
- package/app/stores/basemap_helpers/detail_refresh.ts +134 -0
- package/app/stores/basemap_helpers/detail_view.ts +94 -0
- package/app/stores/basemap_helpers/extent.ts +40 -0
- package/app/stores/basemap_helpers/georeferenced.ts +50 -0
- package/app/stores/basemap_helpers/layers.ts +66 -0
- package/app/stores/basemap_helpers/settings.ts +87 -0
- package/app/stores/basemap_helpers/viewer.ts +114 -0
- package/app/stores/crs.ts +136 -0
- package/app/stores/data.ts +24 -1
- package/app/stores/data_style.ts +8 -0
- package/app/stores/feedback.ts +12 -2
- package/app/stores/hybrid_viewer.ts +1 -1
- package/app/stores/infra.ts +26 -21
- package/app/stores/menu.ts +8 -124
- package/app/stores/menu_helpers/basemap.ts +10 -0
- package/app/stores/menu_helpers/menus_data.ts +27 -0
- package/app/stores/menu_helpers/mesh/edged_curve.ts +12 -0
- package/app/stores/menu_helpers/mesh/grid.ts +24 -0
- package/app/stores/menu_helpers/mesh/point_set.ts +11 -0
- package/app/stores/menu_helpers/mesh/solid.ts +29 -0
- package/app/stores/menu_helpers/mesh/surface.ts +22 -0
- package/app/stores/menu_helpers/model.ts +25 -0
- package/app/stores/menu_helpers/scene.ts +10 -0
- package/app/stores/menu_helpers/types.ts +5 -0
- package/app/stores/treeview.ts +17 -10
- package/app/stores/viewer.ts +17 -79
- package/app/stores/viewer_helpers/actions.ts +68 -0
- package/app/stores/viewer_helpers/request.ts +61 -0
- package/app/utils/basemap_tree.ts +76 -0
- package/app/utils/clipping_planes.ts +4 -131
- package/app/utils/clipping_planes_scene.ts +131 -0
- package/app/utils/color_picker.ts +18 -15
- package/app/utils/coloring_styles.ts +101 -0
- package/app/utils/crs.ts +38 -0
- package/app/utils/default_styles/constants.ts +10 -0
- package/app/utils/default_styles/index.ts +17 -1
- package/app/utils/default_styles/mesh_components.ts +168 -0
- package/app/utils/default_styles/meshes.ts +13 -153
- package/app/utils/default_styles/model_components.ts +170 -0
- package/app/utils/default_styles/models.ts +16 -153
- package/app/utils/drag_and_drop.ts +80 -0
- package/app/utils/extension.ts +1 -1
- package/app/utils/import_workflow.ts +26 -11
- package/app/utils/model_component_coloring.ts +46 -0
- package/app/utils/threshold.ts +33 -0
- package/app/utils/threshold_sources.ts +51 -0
- package/app/utils/treeview.ts +12 -1
- package/app/utils/upload_path.ts +15 -9
- package/app/utils/visible_map_area.ts +129 -0
- package/internal/database/base_database.ts +2 -0
- package/internal/database/database.ts +47 -29
- package/internal/database/tables/scene_style.ts +6 -0
- package/internal/stores/data_style/mesh/base_style.ts +74 -0
- package/internal/stores/data_style/mesh/cells/cell.ts +27 -150
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +74 -0
- package/internal/stores/data_style/mesh/cells/cell_config.ts +152 -0
- package/internal/stores/data_style/mesh/cells/color.ts +3 -1
- package/internal/stores/data_style/mesh/cells/index.ts +17 -1
- package/internal/stores/data_style/mesh/cells/opacity.ts +54 -0
- package/internal/stores/data_style/mesh/cells/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/edges/color.ts +3 -1
- package/internal/stores/data_style/mesh/edges/edge.ts +27 -150
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +74 -0
- package/internal/stores/data_style/mesh/edges/edge_config.ts +152 -0
- package/internal/stores/data_style/mesh/edges/index.ts +17 -1
- package/internal/stores/data_style/mesh/edges/opacity.ts +54 -0
- package/internal/stores/data_style/mesh/edges/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/index.ts +2 -57
- package/internal/stores/data_style/mesh/points/color.ts +3 -1
- package/internal/stores/data_style/mesh/points/index.ts +17 -1
- package/internal/stores/data_style/mesh/points/opacity.ts +54 -0
- package/internal/stores/data_style/mesh/points/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/points/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/polygons/color.ts +3 -1
- package/internal/stores/data_style/mesh/polygons/index.ts +17 -1
- package/internal/stores/data_style/mesh/polygons/opacity.ts +54 -0
- package/internal/stores/data_style/mesh/polygons/polygon.ts +27 -152
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +148 -0
- package/internal/stores/data_style/mesh/polygons/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +152 -0
- package/internal/stores/data_style/mesh/polyhedra/color.ts +3 -1
- package/internal/stores/data_style/mesh/polyhedra/index.ts +17 -1
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +54 -0
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +27 -160
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +82 -0
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +157 -0
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +26 -157
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +80 -0
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +152 -0
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +173 -0
- package/internal/stores/data_style/model/blocks/color.ts +58 -57
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/blocks/index.ts +12 -140
- package/internal/stores/data_style/model/blocks/polyhedron.ts +102 -54
- package/internal/stores/data_style/model/blocks/vertex.ts +102 -54
- package/internal/stores/data_style/model/color.ts +25 -26
- package/internal/stores/data_style/model/common.ts +10 -119
- package/internal/stores/data_style/model/common_mutations.ts +184 -0
- package/internal/stores/data_style/model/corners/index.ts +85 -78
- package/internal/stores/data_style/model/corners/vertex.ts +97 -49
- package/internal/stores/data_style/model/lines/apply_coloring.ts +154 -0
- package/internal/stores/data_style/model/lines/color.ts +53 -40
- package/internal/stores/data_style/model/lines/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/lines/edge.ts +102 -54
- package/internal/stores/data_style/model/lines/index.ts +10 -134
- package/internal/stores/data_style/model/lines/vertex.ts +102 -54
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +186 -0
- package/internal/stores/data_style/model/surfaces/color.ts +68 -56
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +18 -0
- package/internal/stores/data_style/model/surfaces/index.ts +16 -160
- package/internal/stores/data_style/model/surfaces/polygon.ts +94 -46
- package/internal/stores/data_style/model/surfaces/vertex.ts +94 -46
- package/internal/stores/data_style/model/visibility.ts +3 -156
- package/internal/stores/data_style/model/visibility_dispatch.ts +110 -0
- package/internal/stores/data_style/scene.ts +118 -0
- package/internal/stores/data_style/state.ts +5 -181
- package/internal/stores/data_style/state_shared.ts +199 -0
- package/internal/stores/data_style/types.ts +24 -1
- package/internal/stores/hybrid_viewer/brightness.ts +8 -2
- package/internal/stores/hybrid_viewer/camera.ts +7 -161
- package/internal/stores/hybrid_viewer/camera_animation.ts +4 -3
- package/internal/stores/hybrid_viewer/camera_helpers.ts +120 -0
- package/internal/stores/hybrid_viewer/camera_orientation.ts +60 -0
- package/internal/stores/hybrid_viewer/filters.ts +54 -11
- package/internal/stores/hybrid_viewer/highlight.ts +80 -63
- package/internal/stores/hybrid_viewer/ruler.ts +4 -3
- package/internal/stores/hybrid_viewer/scene.ts +34 -26
- package/internal/stores/hybrid_viewer/vtk_types.ts +2 -1
- package/internal/utils/ws_client.ts +8 -1
- package/package.json +5 -5
- package/server/api/local/extensions/run.post.ts +6 -4
- package/server/api/local/extensions/upload.put.ts +47 -20
- package/server/utils/cleanup.ts +12 -2
- package/server/utils/microservices.ts +10 -102
- package/server/utils/microservices_process.ts +127 -0
- package/server/utils/scripts.ts +35 -30
- package/server/utils/typed_handler.ts +8 -1
- package/server/utils/ws_client.ts +15 -2
- package/shared/utils/fetch_raw.ts +2 -2
- package/shared/utils/parse_boolean.ts +4 -1
- package/app/components/Viewer/Options/OptionsSection.vue +0 -76
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
6
|
-
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
|
-
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
8
|
-
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
|
-
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
3
|
+
import ViewerGenericModelLineComponentOptions from "@ogw_front/components/Viewer/Generic/Model/LineComponentOptions.vue";
|
|
4
|
+
import ViewerGenericModelLinesTypeOptions from "@ogw_front/components/Viewer/Generic/Model/LinesTypeOptions.vue";
|
|
10
5
|
|
|
11
6
|
interface Props {
|
|
12
7
|
modelId: string;
|
|
13
8
|
lineId?: string;
|
|
14
9
|
targetLineIds: string[];
|
|
15
10
|
collections?: CollectionComponent[];
|
|
11
|
+
activeTab?: string;
|
|
16
12
|
}
|
|
17
13
|
|
|
18
14
|
const {
|
|
@@ -20,429 +16,21 @@ const {
|
|
|
20
16
|
lineId = undefined,
|
|
21
17
|
targetLineIds,
|
|
22
18
|
collections = undefined,
|
|
19
|
+
activeTab = undefined,
|
|
23
20
|
} = defineProps<Props>();
|
|
24
|
-
|
|
25
|
-
const dataStyleStore = useDataStyleStore();
|
|
26
|
-
const hybridViewerStore = useHybridViewerStore();
|
|
27
|
-
|
|
28
|
-
const referenceLineId = computed<string | undefined>(() =>
|
|
29
|
-
collections ? targetLineIds[0] : undefined,
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
const lineComponentIds = computed<string[]>(() => (lineId === undefined ? [] : [lineId]));
|
|
33
|
-
|
|
34
|
-
// Visibility
|
|
35
|
-
const linesVisibility = computed<boolean>({
|
|
36
|
-
get: () =>
|
|
37
|
-
collections
|
|
38
|
-
? targetLineIds.every((id) => dataStyleStore.modelLineVisibility(modelId, id))
|
|
39
|
-
: dataStyleStore.modelComponentTypeVisibility(modelId, "Line"),
|
|
40
|
-
set: async (newValue) => {
|
|
41
|
-
await dataStyleStore.setModelLinesVisibility(modelId, targetLineIds, newValue);
|
|
42
|
-
hybridViewerStore.remoteRender();
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const lineVisibility = computed<boolean | undefined>({
|
|
47
|
-
get: () => dataStyleStore.modelLineVisibility(modelId, lineId) as boolean | undefined,
|
|
48
|
-
set: async (newValue) => {
|
|
49
|
-
if (newValue === undefined || lineId === undefined) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
await dataStyleStore.setModelLinesVisibility(modelId, [lineId], newValue);
|
|
53
|
-
hybridViewerStore.remoteRender();
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
// Color
|
|
58
|
-
const linesColor = computed<RGBAColor | undefined>({
|
|
59
|
-
get: () => dataStyleStore.modelLineColor(modelId, referenceLineId.value) as RGBAColor | undefined,
|
|
60
|
-
set: async (color) => {
|
|
61
|
-
await dataStyleStore.setModelLinesColor(modelId, targetLineIds, color);
|
|
62
|
-
hybridViewerStore.remoteRender();
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const lineColor = computed<RGBAColor | undefined>({
|
|
67
|
-
get: () => dataStyleStore.modelLineColor(modelId, lineId) as RGBAColor | undefined,
|
|
68
|
-
set: async (color) => {
|
|
69
|
-
if (lineId === undefined) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
await dataStyleStore.setModelLinesColor(modelId, [lineId], color);
|
|
73
|
-
hybridViewerStore.remoteRender();
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const linesActiveColoring = computed<string | undefined>({
|
|
78
|
-
get: () =>
|
|
79
|
-
dataStyleStore.modelLineActiveColoring(modelId, referenceLineId.value) as string | undefined,
|
|
80
|
-
set: async (coloringType) => {
|
|
81
|
-
if (typeof coloringType !== "string") {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (collections && coloringType === "random") {
|
|
85
|
-
await Promise.all(
|
|
86
|
-
collections.map((collection) =>
|
|
87
|
-
dataStyleStore.setModelLinesActiveColoring(
|
|
88
|
-
modelId,
|
|
89
|
-
collection.children.map((child) => child.id),
|
|
90
|
-
coloringType,
|
|
91
|
-
collection.id,
|
|
92
|
-
),
|
|
93
|
-
),
|
|
94
|
-
);
|
|
95
|
-
} else {
|
|
96
|
-
await dataStyleStore.setModelLinesActiveColoring(modelId, targetLineIds, coloringType);
|
|
97
|
-
}
|
|
98
|
-
hybridViewerStore.remoteRender();
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
const lineActiveColoring = computed<string | undefined>({
|
|
103
|
-
get: () => dataStyleStore.modelLineActiveColoring(modelId, lineId) as string | undefined,
|
|
104
|
-
set: async (coloringType) => {
|
|
105
|
-
if (lineId === undefined || typeof coloringType !== "string") {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
await dataStyleStore.setModelLinesActiveColoring(modelId, [lineId], coloringType);
|
|
109
|
-
hybridViewerStore.remoteRender();
|
|
110
|
-
},
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
// Group Attributes
|
|
114
|
-
const linesVertexAttributeName = computed<string | undefined>({
|
|
115
|
-
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, referenceLineId.value),
|
|
116
|
-
set: async (newValue) => {
|
|
117
|
-
if (newValue === undefined) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
await dataStyleStore.setModelLinesVertexAttributeName(modelId, targetLineIds, newValue);
|
|
121
|
-
hybridViewerStore.remoteRender();
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const linesVertexAttributeTimeStep = computed<number | undefined>({
|
|
126
|
-
get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, referenceLineId.value),
|
|
127
|
-
set: async (newValue) => {
|
|
128
|
-
if (newValue === undefined) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
await dataStyleStore.setModelLinesVertexAttributeTimeStep(modelId, targetLineIds, newValue);
|
|
132
|
-
hybridViewerStore.remoteRender();
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const linesVertexAttributeItem = computed<string | undefined>({
|
|
137
|
-
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, referenceLineId.value),
|
|
138
|
-
set: async (newValue) => {
|
|
139
|
-
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, targetLineIds, newValue);
|
|
140
|
-
hybridViewerStore.remoteRender();
|
|
141
|
-
},
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
const linesVertexAttributeRange = computed<[number, number] | undefined>({
|
|
145
|
-
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, referenceLineId.value),
|
|
146
|
-
set: async (newValue) => {
|
|
147
|
-
const [minimum, maximum] = newValue;
|
|
148
|
-
if (minimum === undefined || maximum === undefined) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
await dataStyleStore.setModelLinesVertexAttributeRange(
|
|
152
|
-
modelId,
|
|
153
|
-
targetLineIds,
|
|
154
|
-
minimum,
|
|
155
|
-
maximum,
|
|
156
|
-
);
|
|
157
|
-
hybridViewerStore.remoteRender();
|
|
158
|
-
},
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
const linesVertexAttributeColorMap = computed<RGBAColorMap | undefined>({
|
|
162
|
-
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId, referenceLineId.value),
|
|
163
|
-
set: async (newValue) => {
|
|
164
|
-
await dataStyleStore.setModelLinesVertexAttributeColorMap(modelId, targetLineIds, newValue);
|
|
165
|
-
hybridViewerStore.remoteRender();
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
const linesVertexAttributeNoDataColor = computed<RGBAColor>({
|
|
170
|
-
get: () => dataStyleStore.modelLinesVertexAttributeNoDataColor(modelId, referenceLineId.value),
|
|
171
|
-
set: async (newValue) => {
|
|
172
|
-
await dataStyleStore.setModelLinesVertexAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
173
|
-
hybridViewerStore.remoteRender();
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
const linesEdgeAttributeName = computed<string | undefined>({
|
|
178
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, referenceLineId.value),
|
|
179
|
-
set: async (newValue) => {
|
|
180
|
-
if (newValue === undefined) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
await dataStyleStore.setModelLinesEdgeAttributeName(modelId, targetLineIds, newValue);
|
|
184
|
-
hybridViewerStore.remoteRender();
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
const linesEdgeAttributeTimeStep = computed<number | undefined>({
|
|
189
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, referenceLineId.value),
|
|
190
|
-
set: async (newValue) => {
|
|
191
|
-
if (newValue === undefined) {
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
await dataStyleStore.setModelLinesEdgeAttributeTimeStep(modelId, targetLineIds, newValue);
|
|
195
|
-
hybridViewerStore.remoteRender();
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
const linesEdgeAttributeItem = computed<string | undefined>({
|
|
200
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, referenceLineId.value),
|
|
201
|
-
set: async (newValue) => {
|
|
202
|
-
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, targetLineIds, newValue);
|
|
203
|
-
hybridViewerStore.remoteRender();
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
const linesEdgeAttributeRange = computed<[number, number] | undefined>({
|
|
208
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, referenceLineId.value),
|
|
209
|
-
set: async (newValue) => {
|
|
210
|
-
const [minimum, maximum] = newValue;
|
|
211
|
-
if (minimum === undefined || maximum === undefined) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
await dataStyleStore.setModelLinesEdgeAttributeRange(modelId, targetLineIds, minimum, maximum);
|
|
215
|
-
hybridViewerStore.remoteRender();
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
const linesEdgeAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
220
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId, referenceLineId.value),
|
|
221
|
-
set: async (newValue) => {
|
|
222
|
-
await dataStyleStore.setModelLinesEdgeAttributeColorMap(modelId, targetLineIds, newValue);
|
|
223
|
-
hybridViewerStore.remoteRender();
|
|
224
|
-
},
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
const linesEdgeAttributeNoDataColor = computed<RGBAColor>({
|
|
228
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeNoDataColor(modelId, referenceLineId.value),
|
|
229
|
-
set: async (newValue) => {
|
|
230
|
-
await dataStyleStore.setModelLinesEdgeAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
231
|
-
hybridViewerStore.remoteRender();
|
|
232
|
-
},
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// Individual Attributes
|
|
236
|
-
const vertexAttributeName = computed<string | undefined>({
|
|
237
|
-
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, lineId),
|
|
238
|
-
set: async (newValue) => {
|
|
239
|
-
if (lineId === undefined || newValue === undefined) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
await dataStyleStore.setModelLinesVertexAttributeName(modelId, [lineId], newValue);
|
|
243
|
-
hybridViewerStore.remoteRender();
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
const vertexAttributeTimeStep = computed<number | undefined>({
|
|
248
|
-
get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, lineId),
|
|
249
|
-
set: async (newValue) => {
|
|
250
|
-
if (lineId === undefined || newValue === undefined) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
await dataStyleStore.setModelLinesVertexAttributeTimeStep(modelId, [lineId], newValue);
|
|
254
|
-
hybridViewerStore.remoteRender();
|
|
255
|
-
},
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
const vertexAttributeItem = computed<string | undefined>({
|
|
259
|
-
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, lineId),
|
|
260
|
-
set: async (newValue) => {
|
|
261
|
-
if (lineId === undefined) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, [lineId], newValue);
|
|
265
|
-
hybridViewerStore.remoteRender();
|
|
266
|
-
},
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
const vertexAttributeRange = computed<[number, number] | undefined>({
|
|
270
|
-
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, lineId),
|
|
271
|
-
set: async (newValue) => {
|
|
272
|
-
const [minimum, maximum] = newValue;
|
|
273
|
-
if (lineId === undefined || minimum === undefined || maximum === undefined) {
|
|
274
|
-
return;
|
|
275
|
-
}
|
|
276
|
-
await dataStyleStore.setModelLinesVertexAttributeRange(modelId, [lineId], minimum, maximum);
|
|
277
|
-
hybridViewerStore.remoteRender();
|
|
278
|
-
},
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
const vertexAttributeColorMap = computed<ColorMap | undefined>({
|
|
282
|
-
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId, lineId),
|
|
283
|
-
set: async (newValue) => {
|
|
284
|
-
if (lineId === undefined) {
|
|
285
|
-
return;
|
|
286
|
-
}
|
|
287
|
-
await dataStyleStore.setModelLinesVertexAttributeColorMap(modelId, [lineId], newValue);
|
|
288
|
-
hybridViewerStore.remoteRender();
|
|
289
|
-
},
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
const vertexAttributeNoDataColor = computed<RGBAColor>({
|
|
293
|
-
get: () => dataStyleStore.modelLinesVertexAttributeNoDataColor(modelId, lineId),
|
|
294
|
-
set: async (newValue) => {
|
|
295
|
-
if (lineId === undefined) {
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
await dataStyleStore.setModelLinesVertexAttributeNoDataColor(modelId, [lineId], newValue);
|
|
299
|
-
hybridViewerStore.remoteRender();
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
|
|
303
|
-
const edgeAttributeName = computed<string | undefined>({
|
|
304
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, lineId),
|
|
305
|
-
set: async (newValue) => {
|
|
306
|
-
if (lineId === undefined || newValue === undefined) {
|
|
307
|
-
return;
|
|
308
|
-
}
|
|
309
|
-
await dataStyleStore.setModelLinesEdgeAttributeName(modelId, [lineId], newValue);
|
|
310
|
-
hybridViewerStore.remoteRender();
|
|
311
|
-
},
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
const edgeAttributeTimeStep = computed<number | undefined>({
|
|
315
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, lineId),
|
|
316
|
-
set: async (newValue) => {
|
|
317
|
-
if (lineId === undefined || newValue === undefined) {
|
|
318
|
-
return;
|
|
319
|
-
}
|
|
320
|
-
await dataStyleStore.setModelLinesEdgeAttributeTimeStep(modelId, [lineId], newValue);
|
|
321
|
-
hybridViewerStore.remoteRender();
|
|
322
|
-
},
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
const edgeAttributeItem = computed<string | undefined>({
|
|
326
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, lineId),
|
|
327
|
-
set: async (newValue) => {
|
|
328
|
-
if (lineId === undefined) {
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, [lineId], newValue);
|
|
332
|
-
hybridViewerStore.remoteRender();
|
|
333
|
-
},
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
const edgeAttributeRange = computed<[number, number] | undefined>({
|
|
337
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, lineId),
|
|
338
|
-
set: async (newValue) => {
|
|
339
|
-
const [minimum, maximum] = newValue;
|
|
340
|
-
if (lineId === undefined || minimum === undefined || maximum === undefined) {
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
await dataStyleStore.setModelLinesEdgeAttributeRange(modelId, [lineId], minimum, maximum);
|
|
344
|
-
hybridViewerStore.remoteRender();
|
|
345
|
-
},
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
const edgeAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
349
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId, lineId),
|
|
350
|
-
set: async (newValue) => {
|
|
351
|
-
if (lineId === undefined) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
await dataStyleStore.setModelLinesEdgeAttributeColorMap(modelId, [lineId], newValue);
|
|
355
|
-
hybridViewerStore.remoteRender();
|
|
356
|
-
},
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
const edgeAttributeNoDataColor = computed<RGBAColor>({
|
|
360
|
-
get: () => dataStyleStore.modelLinesEdgeAttributeNoDataColor(modelId, lineId),
|
|
361
|
-
set: async (newValue) => {
|
|
362
|
-
if (lineId === undefined) {
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
await dataStyleStore.setModelLinesEdgeAttributeNoDataColor(modelId, [lineId], newValue);
|
|
366
|
-
hybridViewerStore.remoteRender();
|
|
367
|
-
},
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
const capabilities = {
|
|
371
|
-
color: { available: true },
|
|
372
|
-
textures: { available: false },
|
|
373
|
-
vertex: { available: true },
|
|
374
|
-
edge: { available: true },
|
|
375
|
-
cell: { available: false },
|
|
376
|
-
polygon: { available: false },
|
|
377
|
-
polyhedron: { available: false },
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
const backSchemas = back_schemas.opengeodeweb_back;
|
|
381
|
-
const attributeSchemas = {
|
|
382
|
-
vertex: {
|
|
383
|
-
names: backSchemas.model_component_vertex_attribute_names,
|
|
384
|
-
range: backSchemas.model_component_vertex_attribute_range,
|
|
385
|
-
},
|
|
386
|
-
edge: {
|
|
387
|
-
names: backSchemas.model_component_edge_attribute_names,
|
|
388
|
-
range: backSchemas.model_component_edge_attribute_range,
|
|
389
|
-
},
|
|
390
|
-
};
|
|
391
21
|
</script>
|
|
392
22
|
|
|
393
23
|
<template>
|
|
394
|
-
<
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
v-model:vertex_attribute_name="linesVertexAttributeName"
|
|
402
|
-
v-model:vertex_attribute_item="linesVertexAttributeItem"
|
|
403
|
-
v-model:vertex_attribute_range="linesVertexAttributeRange"
|
|
404
|
-
v-model:vertex_attribute_color_map="linesVertexAttributeColorMap"
|
|
405
|
-
v-model:vertex_attribute_no_data_color="linesVertexAttributeNoDataColor"
|
|
406
|
-
v-model:vertex_attribute_time_step="linesVertexAttributeTimeStep"
|
|
407
|
-
v-model:edge_attribute_name="linesEdgeAttributeName"
|
|
408
|
-
v-model:edge_attribute_item="linesEdgeAttributeItem"
|
|
409
|
-
v-model:edge_attribute_range="linesEdgeAttributeRange"
|
|
410
|
-
v-model:edge_attribute_color_map="linesEdgeAttributeColorMap"
|
|
411
|
-
v-model:edge_attribute_no_data_color="linesEdgeAttributeNoDataColor"
|
|
412
|
-
v-model:edge_attribute_time_step="linesEdgeAttributeTimeStep"
|
|
413
|
-
:capabilities="capabilities"
|
|
414
|
-
:schemas="attributeSchemas"
|
|
415
|
-
:allowRandom="true"
|
|
416
|
-
/>
|
|
417
|
-
</OptionsSection>
|
|
418
|
-
|
|
419
|
-
<OptionsSection
|
|
24
|
+
<ViewerGenericModelLinesTypeOptions
|
|
25
|
+
:modelId="modelId"
|
|
26
|
+
:targetLineIds="targetLineIds"
|
|
27
|
+
:collections="collections"
|
|
28
|
+
:activeTab="activeTab"
|
|
29
|
+
/>
|
|
30
|
+
<ViewerGenericModelLineComponentOptions
|
|
420
31
|
v-if="lineId"
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
<VisibilitySwitch v-model="lineVisibility" />
|
|
426
|
-
<ViewerOptionsColoringTypeSelector
|
|
427
|
-
:id="modelId"
|
|
428
|
-
:componentIds="lineComponentIds"
|
|
429
|
-
v-model:coloring_style_key="lineActiveColoring"
|
|
430
|
-
v-model:color="lineColor"
|
|
431
|
-
v-model:vertex_attribute_name="vertexAttributeName"
|
|
432
|
-
v-model:vertex_attribute_item="vertexAttributeItem"
|
|
433
|
-
v-model:vertex_attribute_range="vertexAttributeRange"
|
|
434
|
-
v-model:vertex_attribute_color_map="vertexAttributeColorMap"
|
|
435
|
-
v-model:vertex_attribute_no_data_color="vertexAttributeNoDataColor"
|
|
436
|
-
v-model:vertex_attribute_time_step="vertexAttributeTimeStep"
|
|
437
|
-
v-model:edge_attribute_name="edgeAttributeName"
|
|
438
|
-
v-model:edge_attribute_item="edgeAttributeItem"
|
|
439
|
-
v-model:edge_attribute_range="edgeAttributeRange"
|
|
440
|
-
v-model:edge_attribute_color_map="edgeAttributeColorMap"
|
|
441
|
-
v-model:edge_attribute_no_data_color="edgeAttributeNoDataColor"
|
|
442
|
-
v-model:edge_attribute_time_step="edgeAttributeTimeStep"
|
|
443
|
-
:capabilities="capabilities"
|
|
444
|
-
:schemas="attributeSchemas"
|
|
445
|
-
:allowRandom="true"
|
|
446
|
-
/>
|
|
447
|
-
</OptionsSection>
|
|
32
|
+
:modelId="modelId"
|
|
33
|
+
:lineId="lineId"
|
|
34
|
+
:activeTab="activeTab"
|
|
35
|
+
/>
|
|
448
36
|
</template>
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
3
|
+
import { MODEL_LINE_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
4
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
5
|
+
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
6
|
+
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
|
+
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
modelId: string;
|
|
12
|
+
targetLineIds: string[];
|
|
13
|
+
collections?: CollectionComponent[];
|
|
14
|
+
activeTab?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
modelId,
|
|
19
|
+
targetLineIds,
|
|
20
|
+
collections = undefined,
|
|
21
|
+
activeTab = undefined,
|
|
22
|
+
} = defineProps<Props>();
|
|
23
|
+
|
|
24
|
+
const dataStyleStore = useDataStyleStore();
|
|
25
|
+
const hybridViewerStore = useHybridViewerStore();
|
|
26
|
+
|
|
27
|
+
const referenceLineId = computed<string | undefined>(() =>
|
|
28
|
+
collections ? targetLineIds[0] : undefined,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
// Visibility
|
|
32
|
+
const linesVisibility = computed<boolean>({
|
|
33
|
+
get: () => {
|
|
34
|
+
if (collections) {
|
|
35
|
+
return targetLineIds.every((id) => dataStyleStore.modelLineVisibility(modelId, id));
|
|
36
|
+
}
|
|
37
|
+
return dataStyleStore.modelComponentTypeVisibility(modelId, "Line");
|
|
38
|
+
},
|
|
39
|
+
set: async (newValue) => {
|
|
40
|
+
await dataStyleStore.setModelLinesVisibility(modelId, targetLineIds, newValue);
|
|
41
|
+
hybridViewerStore.remoteRender();
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Color
|
|
46
|
+
const linesColor = computed<RGBAColor | undefined>({
|
|
47
|
+
get: () => dataStyleStore.modelLineColor(modelId, referenceLineId.value) as RGBAColor | undefined,
|
|
48
|
+
set: async (color) => {
|
|
49
|
+
await dataStyleStore.setModelLinesColor(modelId, targetLineIds, color);
|
|
50
|
+
hybridViewerStore.remoteRender();
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const linesActiveColoring = computed<string | undefined>({
|
|
55
|
+
get: () =>
|
|
56
|
+
dataStyleStore.modelLineActiveColoring(modelId, referenceLineId.value) as string | undefined,
|
|
57
|
+
set: async (coloringType) => {
|
|
58
|
+
if (typeof coloringType !== "string") {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (collections && coloringType === "random") {
|
|
62
|
+
await Promise.all(
|
|
63
|
+
collections.map((collection) =>
|
|
64
|
+
dataStyleStore.setModelLinesActiveColoring(
|
|
65
|
+
modelId,
|
|
66
|
+
collection.children.map((child) => child.id),
|
|
67
|
+
coloringType,
|
|
68
|
+
collection.id,
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
);
|
|
72
|
+
} else {
|
|
73
|
+
await dataStyleStore.setModelLinesActiveColoring(modelId, targetLineIds, coloringType);
|
|
74
|
+
}
|
|
75
|
+
hybridViewerStore.remoteRender();
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// Group Attributes
|
|
80
|
+
const linesVertexAttributeName = computed<string | undefined>({
|
|
81
|
+
get: () => dataStyleStore.modelLinesVertexAttributeName(modelId, referenceLineId.value),
|
|
82
|
+
set: async (newValue) => {
|
|
83
|
+
if (newValue === undefined) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
await dataStyleStore.setModelLinesVertexAttributeName(modelId, targetLineIds, newValue);
|
|
87
|
+
hybridViewerStore.remoteRender();
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const linesVertexAttributeTimeStep = computed<number | undefined>({
|
|
92
|
+
get: () => dataStyleStore.modelLinesVertexAttributeTimeStep(modelId, referenceLineId.value),
|
|
93
|
+
set: async (newValue) => {
|
|
94
|
+
if (newValue === undefined) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
await dataStyleStore.setModelLinesVertexAttributeTimeStep(modelId, targetLineIds, newValue);
|
|
98
|
+
hybridViewerStore.remoteRender();
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const linesVertexAttributeItem = computed<string | undefined>({
|
|
103
|
+
get: () => dataStyleStore.modelLinesVertexAttributeItem(modelId, referenceLineId.value),
|
|
104
|
+
set: async (newValue) => {
|
|
105
|
+
await dataStyleStore.setModelLinesVertexAttributeItem(modelId, targetLineIds, newValue);
|
|
106
|
+
hybridViewerStore.remoteRender();
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const linesVertexAttributeRange = computed<[number, number] | undefined>({
|
|
111
|
+
get: () => dataStyleStore.modelLinesVertexAttributeRange(modelId, referenceLineId.value),
|
|
112
|
+
set: async (newValue) => {
|
|
113
|
+
const [minimum, maximum] = newValue;
|
|
114
|
+
if (minimum === undefined || maximum === undefined) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
await dataStyleStore.setModelLinesVertexAttributeRange(
|
|
118
|
+
modelId,
|
|
119
|
+
targetLineIds,
|
|
120
|
+
minimum,
|
|
121
|
+
maximum,
|
|
122
|
+
);
|
|
123
|
+
hybridViewerStore.remoteRender();
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const linesVertexAttributeColorMap = computed<RGBAColorMap | undefined>({
|
|
128
|
+
get: () => dataStyleStore.modelLinesVertexAttributeColorMap(modelId, referenceLineId.value),
|
|
129
|
+
set: async (newValue) => {
|
|
130
|
+
await dataStyleStore.setModelLinesVertexAttributeColorMap(modelId, targetLineIds, newValue);
|
|
131
|
+
hybridViewerStore.remoteRender();
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
const linesVertexAttributeNoDataColor = computed<RGBAColor>({
|
|
136
|
+
get: () => dataStyleStore.modelLinesVertexAttributeNoDataColor(modelId, referenceLineId.value),
|
|
137
|
+
set: async (newValue) => {
|
|
138
|
+
await dataStyleStore.setModelLinesVertexAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
139
|
+
hybridViewerStore.remoteRender();
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const linesEdgeAttributeName = computed<string | undefined>({
|
|
144
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeName(modelId, referenceLineId.value),
|
|
145
|
+
set: async (newValue) => {
|
|
146
|
+
if (newValue === undefined) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
await dataStyleStore.setModelLinesEdgeAttributeName(modelId, targetLineIds, newValue);
|
|
150
|
+
hybridViewerStore.remoteRender();
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
const linesEdgeAttributeTimeStep = computed<number | undefined>({
|
|
155
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeTimeStep(modelId, referenceLineId.value),
|
|
156
|
+
set: async (newValue) => {
|
|
157
|
+
if (newValue === undefined) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
await dataStyleStore.setModelLinesEdgeAttributeTimeStep(modelId, targetLineIds, newValue);
|
|
161
|
+
hybridViewerStore.remoteRender();
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
const linesEdgeAttributeItem = computed<string | undefined>({
|
|
166
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeItem(modelId, referenceLineId.value),
|
|
167
|
+
set: async (newValue) => {
|
|
168
|
+
await dataStyleStore.setModelLinesEdgeAttributeItem(modelId, targetLineIds, newValue);
|
|
169
|
+
hybridViewerStore.remoteRender();
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const linesEdgeAttributeRange = computed<[number, number] | undefined>({
|
|
174
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeRange(modelId, referenceLineId.value),
|
|
175
|
+
set: async (newValue) => {
|
|
176
|
+
const [minimum, maximum] = newValue;
|
|
177
|
+
if (minimum === undefined || maximum === undefined) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
await dataStyleStore.setModelLinesEdgeAttributeRange(modelId, targetLineIds, minimum, maximum);
|
|
181
|
+
hybridViewerStore.remoteRender();
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
const linesEdgeAttributeColorMap = computed<Map<string, RGBAColor> | undefined>({
|
|
186
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeColorMap(modelId, referenceLineId.value),
|
|
187
|
+
set: async (newValue) => {
|
|
188
|
+
await dataStyleStore.setModelLinesEdgeAttributeColorMap(modelId, targetLineIds, newValue);
|
|
189
|
+
hybridViewerStore.remoteRender();
|
|
190
|
+
},
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const linesEdgeAttributeNoDataColor = computed<RGBAColor>({
|
|
194
|
+
get: () => dataStyleStore.modelLinesEdgeAttributeNoDataColor(modelId, referenceLineId.value),
|
|
195
|
+
set: async (newValue) => {
|
|
196
|
+
await dataStyleStore.setModelLinesEdgeAttributeNoDataColor(modelId, targetLineIds, newValue);
|
|
197
|
+
hybridViewerStore.remoteRender();
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
const { capabilities, schemas: attributeSchemas } = MODEL_LINE_COLORING;
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
|
+
<template>
|
|
205
|
+
<div v-show="!activeTab || activeTab === 'type'" data-testid="modelComponentTypeOptions">
|
|
206
|
+
<VisibilitySwitch data-testid="modelLinesVisibilitySwitch" v-model="linesVisibility" />
|
|
207
|
+
<ViewerOptionsColoringTypeSelector
|
|
208
|
+
:id="modelId"
|
|
209
|
+
:componentIds="targetLineIds"
|
|
210
|
+
v-model:coloring_style_key="linesActiveColoring"
|
|
211
|
+
v-model:color="linesColor"
|
|
212
|
+
v-model:vertex_attribute_name="linesVertexAttributeName"
|
|
213
|
+
v-model:vertex_attribute_item="linesVertexAttributeItem"
|
|
214
|
+
v-model:vertex_attribute_range="linesVertexAttributeRange"
|
|
215
|
+
v-model:vertex_attribute_color_map="linesVertexAttributeColorMap"
|
|
216
|
+
v-model:vertex_attribute_no_data_color="linesVertexAttributeNoDataColor"
|
|
217
|
+
v-model:vertex_attribute_time_step="linesVertexAttributeTimeStep"
|
|
218
|
+
v-model:edge_attribute_name="linesEdgeAttributeName"
|
|
219
|
+
v-model:edge_attribute_item="linesEdgeAttributeItem"
|
|
220
|
+
v-model:edge_attribute_range="linesEdgeAttributeRange"
|
|
221
|
+
v-model:edge_attribute_color_map="linesEdgeAttributeColorMap"
|
|
222
|
+
v-model:edge_attribute_no_data_color="linesEdgeAttributeNoDataColor"
|
|
223
|
+
v-model:edge_attribute_time_step="linesEdgeAttributeTimeStep"
|
|
224
|
+
:capabilities="capabilities"
|
|
225
|
+
:schemas="attributeSchemas"
|
|
226
|
+
:allowRandom="true"
|
|
227
|
+
/>
|
|
228
|
+
</div>
|
|
229
|
+
</template>
|