@geode/opengeodeweb-front 10.14.2-rc.1 → 10.14.2-rc.3
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/Basic/Slider.vue +7 -0
- package/app/components/Basic/Switch.vue +7 -0
- package/app/components/HybridRenderingView.vue +1 -1
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +5 -9
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +7 -2
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +11 -57
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +15 -9
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +10 -50
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +14 -2
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +2 -14
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +48 -13
- package/app/components/Viewer/Options/Sliders/Size.vue +8 -0
- package/app/components/Viewer/Options/Sliders/Slider.vue +17 -0
- package/app/components/Viewer/Options/Sliders/Width.vue +8 -0
- package/app/components/Viewer/Options/VisibilitySwitch.vue +3 -1
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -5
- package/app/components/Viewer/Surface/Triangulated/TrianglesOptions.vue +11 -0
- package/app/stores/hybrid_viewer.js +3 -0
- package/app/stores/menu.js +8 -14
- package/internal/stores/data_style/mesh/points/vertex.js +16 -16
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +16 -16
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +16 -16
- package/package.json +1 -1
- package/tests/integration/setup.js +2 -1
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +2 -3
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +2 -3
- package/tests/integration/stores/viewer.nuxt.test.js +2 -2
- package/app/components/Viewer/HybridSolid/EdgesOptions.vue +0 -12
- package/app/components/Viewer/HybridSolid/PointsOptions.vue +0 -12
- package/app/components/Viewer/HybridSolid/PolygonsOptions.vue +0 -12
- package/app/components/Viewer/HybridSolid/PolyhedraOptions.vue +0 -12
- package/app/components/Viewer/PolygonalSurface/EdgesOptions.vue +0 -12
- package/app/components/Viewer/PolygonalSurface/PointsOptions.vue +0 -12
- package/app/components/Viewer/TriangulatedSurface/TrianglesOptions.vue +0 -16
- package/tests/integration/microservices/back/requirements.txt +0 -7
- package/tests/integration/microservices/viewer/requirements.txt +0 -7
- /package/app/components/Viewer/{TriangulatedSurface → Surface}/EdgesOptions.vue +0 -0
- /package/app/components/Viewer/{TriangulatedSurface → Surface}/PointsOptions.vue +0 -0
- /package/app/components/Viewer/{PolygonalSurface/SpecificPolygonsOptions.vue → Surface/PolygonsOptions.vue} +0 -0
|
@@ -46,7 +46,7 @@ function debounce(func, wait) {
|
|
|
46
46
|
|
|
47
47
|
<template>
|
|
48
48
|
<ClientOnly>
|
|
49
|
-
<div class="fill-height" style="position: relative; height: 100%">
|
|
49
|
+
<div data-testid="hybridViewer" class="fill-height" style="position: relative; height: 100%">
|
|
50
50
|
<VeaseViewToolbar />
|
|
51
51
|
<slot name="ui"></slot>
|
|
52
52
|
<v-col
|
|
@@ -3,6 +3,7 @@ import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg
|
|
|
3
3
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem";
|
|
4
4
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
5
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
6
|
+
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width";
|
|
6
7
|
|
|
7
8
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
9
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -23,7 +24,7 @@ const visibility = computed({
|
|
|
23
24
|
hybridViewerStore.remoteRender();
|
|
24
25
|
},
|
|
25
26
|
});
|
|
26
|
-
const
|
|
27
|
+
const width = computed({
|
|
27
28
|
get: () => dataStyleStore.meshEdgesWidth(id.value),
|
|
28
29
|
set: async (newValue) => {
|
|
29
30
|
await dataStyleStore.setMeshEdgesWidth(id.value, newValue);
|
|
@@ -90,20 +91,15 @@ const edge_attribute_color_map = computed({
|
|
|
90
91
|
<template>
|
|
91
92
|
<ViewerContextMenuItem
|
|
92
93
|
:itemProps="itemProps"
|
|
93
|
-
tooltip="Edges options"
|
|
94
94
|
:btn_image="EdgedCurveEdges"
|
|
95
|
+
tooltip="Edges options"
|
|
95
96
|
>
|
|
96
97
|
<template #options>
|
|
97
|
-
<ViewerOptionsVisibilitySwitch v-model="visibility" />
|
|
98
|
+
<ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
|
|
98
99
|
<template v-if="visibility">
|
|
99
100
|
<v-row class="pa-0" align="center">
|
|
100
101
|
<v-divider />
|
|
101
|
-
<v-
|
|
102
|
-
<v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Width'" />
|
|
103
|
-
</v-col>
|
|
104
|
-
<v-col justify="center">
|
|
105
|
-
<v-slider v-model="size" hide-details min="0" max="20" step="2" />
|
|
106
|
-
</v-col>
|
|
102
|
+
<ViewerOptionsWidthSlider v-model="width" />
|
|
107
103
|
</v-row>
|
|
108
104
|
<v-row>
|
|
109
105
|
<v-col>
|
|
@@ -90,9 +90,14 @@ const cell_attribute_color_map = computed({
|
|
|
90
90
|
</script>
|
|
91
91
|
|
|
92
92
|
<template>
|
|
93
|
-
<ViewerContextMenuItem
|
|
93
|
+
<ViewerContextMenuItem
|
|
94
|
+
data-testid="meshCellsMenu"
|
|
95
|
+
:itemProps="itemProps"
|
|
96
|
+
:tooltip="tooltip"
|
|
97
|
+
:btn_image="btn_image"
|
|
98
|
+
>
|
|
94
99
|
<template #options>
|
|
95
|
-
<ViewerOptionsVisibilitySwitch v-model="visibility" />
|
|
100
|
+
<ViewerOptionsVisibilitySwitch data-testid="meshCellsVisibilitySwitch" v-model="visibility" />
|
|
96
101
|
<template v-if="visibility">
|
|
97
102
|
<ViewerOptionsColoringTypeSelector
|
|
98
103
|
:id="id"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem";
|
|
3
3
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
4
4
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
|
+
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width";
|
|
5
6
|
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
8
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -9,9 +10,10 @@ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
11
12
|
|
|
12
|
-
const { itemProps, btn_image } = defineProps({
|
|
13
|
+
const { itemProps, btn_image, tooltip } = defineProps({
|
|
13
14
|
itemProps: { type: Object, required: true },
|
|
14
15
|
btn_image: { type: String, required: true },
|
|
16
|
+
tooltip: { type: String, required: false, default: "Edges options" },
|
|
15
17
|
});
|
|
16
18
|
|
|
17
19
|
const id = toRef(() => itemProps.id);
|
|
@@ -44,63 +46,21 @@ const color = computed({
|
|
|
44
46
|
hybridViewerStore.remoteRender();
|
|
45
47
|
},
|
|
46
48
|
});
|
|
47
|
-
const vertex_attribute_name = computed({
|
|
48
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeName(id.value),
|
|
49
|
-
set: async (newValue) => {
|
|
50
|
-
await dataStyleStore.setMeshEdgesVertexAttributeName(id.value, newValue);
|
|
51
|
-
hybridViewerStore.remoteRender();
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
const vertex_attribute_range = computed({
|
|
55
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeRange(id.value),
|
|
56
|
-
set: async (newValue) => {
|
|
57
|
-
await dataStyleStore.setMeshEdgesVertexAttributeRange(id.value, newValue[0], newValue[1]);
|
|
58
|
-
hybridViewerStore.remoteRender();
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
const vertex_attribute_color_map = computed({
|
|
62
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id.value),
|
|
63
|
-
set: async (newValue) => {
|
|
64
|
-
await dataStyleStore.setMeshEdgesVertexAttributeColorMap(id.value, newValue);
|
|
65
|
-
hybridViewerStore.remoteRender();
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
const edge_attribute_name = computed({
|
|
69
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeName(id.value),
|
|
70
|
-
set: async (newValue) => {
|
|
71
|
-
await dataStyleStore.setMeshEdgesEdgeAttributeName(id.value, newValue);
|
|
72
|
-
hybridViewerStore.remoteRender();
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
const edge_attribute_range = computed({
|
|
76
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id.value),
|
|
77
|
-
set: async (newValue) => {
|
|
78
|
-
await dataStyleStore.setMeshEdgesEdgeAttributeRange(id.value, newValue[0], newValue[1]);
|
|
79
|
-
hybridViewerStore.remoteRender();
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
const edge_attribute_color_map = computed({
|
|
83
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value),
|
|
84
|
-
set: async (newValue) => {
|
|
85
|
-
await dataStyleStore.setMeshEdgesEdgeAttributeColorMap(id.value, newValue);
|
|
86
|
-
hybridViewerStore.remoteRender();
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
49
|
</script>
|
|
90
50
|
|
|
91
51
|
<template>
|
|
92
|
-
<ViewerContextMenuItem
|
|
52
|
+
<ViewerContextMenuItem
|
|
53
|
+
data-testid="meshEdgesMenu"
|
|
54
|
+
:itemProps="itemProps"
|
|
55
|
+
:tooltip="tooltip"
|
|
56
|
+
:btn_image="btn_image"
|
|
57
|
+
>
|
|
93
58
|
<template #options>
|
|
94
|
-
<ViewerOptionsVisibilitySwitch v-model="visibility" />
|
|
59
|
+
<ViewerOptionsVisibilitySwitch data-testid="meshEdgesVisibilitySwitch" v-model="visibility" />
|
|
95
60
|
<template v-if="visibility">
|
|
96
61
|
<v-row class="pa-0" align="center">
|
|
97
62
|
<v-divider />
|
|
98
|
-
<
|
|
99
|
-
<v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Width'" />
|
|
100
|
-
</v-col>
|
|
101
|
-
<v-col justify="center">
|
|
102
|
-
<v-slider v-model="size" hide-details min="0" max="20" step="2" />
|
|
103
|
-
</v-col>
|
|
63
|
+
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="size" />
|
|
104
64
|
</v-row>
|
|
105
65
|
<v-row>
|
|
106
66
|
<v-col>
|
|
@@ -108,12 +68,6 @@ const edge_attribute_color_map = computed({
|
|
|
108
68
|
:id="id"
|
|
109
69
|
v-model:coloring_style_key="coloring_style_key"
|
|
110
70
|
v-model:color="color"
|
|
111
|
-
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
112
|
-
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
113
|
-
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
114
|
-
v-model:edge_attribute_name="edge_attribute_name"
|
|
115
|
-
v-model:edge_attribute_range="edge_attribute_range"
|
|
116
|
-
v-model:edge_attribute_color_map="edge_attribute_color_map"
|
|
117
71
|
/>
|
|
118
72
|
</v-col>
|
|
119
73
|
</v-row>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem";
|
|
3
3
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector";
|
|
4
|
+
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
|
|
4
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
6
|
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -9,9 +10,10 @@ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
|
9
10
|
const dataStyleStore = useDataStyleStore();
|
|
10
11
|
const hybridViewerStore = useHybridViewerStore();
|
|
11
12
|
|
|
12
|
-
const { itemProps, btn_image } = defineProps({
|
|
13
|
+
const { itemProps, btn_image, tooltip } = defineProps({
|
|
13
14
|
itemProps: { type: Object, required: true },
|
|
14
15
|
btn_image: { type: String, required: true },
|
|
16
|
+
tooltip: { type: String, required: false, default: "Points options" },
|
|
15
17
|
});
|
|
16
18
|
|
|
17
19
|
const id = toRef(() => itemProps.id);
|
|
@@ -68,18 +70,21 @@ const vertex_attribute_color_map = computed({
|
|
|
68
70
|
</script>
|
|
69
71
|
|
|
70
72
|
<template>
|
|
71
|
-
<ViewerContextMenuItem
|
|
73
|
+
<ViewerContextMenuItem
|
|
74
|
+
data-testid="meshPointsMenu"
|
|
75
|
+
:itemProps="itemProps"
|
|
76
|
+
:tooltip="tooltip"
|
|
77
|
+
:btn_image="btn_image"
|
|
78
|
+
>
|
|
72
79
|
<template #options>
|
|
73
|
-
<ViewerOptionsVisibilitySwitch
|
|
80
|
+
<ViewerOptionsVisibilitySwitch
|
|
81
|
+
data-testid="meshPointsVisibilitySwitch"
|
|
82
|
+
v-model="visibility"
|
|
83
|
+
/>
|
|
74
84
|
<template v-if="visibility">
|
|
75
85
|
<v-row class="pa-0" align="center">
|
|
76
86
|
<v-divider />
|
|
77
|
-
<
|
|
78
|
-
<v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Size'" />
|
|
79
|
-
</v-col>
|
|
80
|
-
<v-col justify="center">
|
|
81
|
-
<v-slider v-model="size" hide-details min="0" max="20" step="2" />
|
|
82
|
-
</v-col>
|
|
87
|
+
<ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
|
|
83
88
|
</v-row>
|
|
84
89
|
<v-row>
|
|
85
90
|
<v-col>
|
|
@@ -90,6 +95,7 @@ const vertex_attribute_color_map = computed({
|
|
|
90
95
|
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
91
96
|
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
92
97
|
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
98
|
+
:capabilities="{ vertex: { available: false } }"
|
|
93
99
|
/>
|
|
94
100
|
</v-col>
|
|
95
101
|
</v-row>
|
|
@@ -45,66 +45,26 @@ const textures = computed({
|
|
|
45
45
|
hybridViewerStore.remoteRender();
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
|
-
const vertex_attribute_name = computed({
|
|
49
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeName(id.value),
|
|
50
|
-
set: async (newValue) => {
|
|
51
|
-
await dataStyleStore.setMeshPolygonsVertexAttributeName(id.value, newValue);
|
|
52
|
-
hybridViewerStore.remoteRender();
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
const vertex_attribute_range = computed({
|
|
56
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeRange(id.value),
|
|
57
|
-
set: async (newValue) => {
|
|
58
|
-
await dataStyleStore.setMeshPolygonsVertexAttributeRange(id.value, newValue[0], newValue[1]);
|
|
59
|
-
hybridViewerStore.remoteRender();
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
const vertex_attribute_color_map = computed({
|
|
63
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(id.value),
|
|
64
|
-
set: async (newValue) => {
|
|
65
|
-
await dataStyleStore.setMeshPolygonsVertexAttributeColorMap(id.value, newValue);
|
|
66
|
-
hybridViewerStore.remoteRender();
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
const polygon_attribute_name = computed({
|
|
70
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeName(id.value),
|
|
71
|
-
set: async (newValue) => {
|
|
72
|
-
await dataStyleStore.setMeshPolygonsPolygonAttributeName(id.value, newValue);
|
|
73
|
-
hybridViewerStore.remoteRender();
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
const polygon_attribute_range = computed({
|
|
77
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(id.value),
|
|
78
|
-
set: async (newValue) => {
|
|
79
|
-
await dataStyleStore.setMeshPolygonsPolygonAttributeRange(id.value, newValue[0], newValue[1]);
|
|
80
|
-
hybridViewerStore.remoteRender();
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
const polygon_attribute_color_map = computed({
|
|
84
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(id.value),
|
|
85
|
-
set: async (newValue) => {
|
|
86
|
-
await dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(id.value, newValue);
|
|
87
|
-
hybridViewerStore.remoteRender();
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
48
|
</script>
|
|
91
49
|
|
|
92
50
|
<template>
|
|
93
|
-
<ViewerContextMenuItem
|
|
51
|
+
<ViewerContextMenuItem
|
|
52
|
+
data-testid="meshPolygonsMenu"
|
|
53
|
+
:itemProps="itemProps"
|
|
54
|
+
:tooltip="tooltip"
|
|
55
|
+
:btn_image="btn_image"
|
|
56
|
+
>
|
|
94
57
|
<template #options>
|
|
95
|
-
<ViewerOptionsVisibilitySwitch
|
|
58
|
+
<ViewerOptionsVisibilitySwitch
|
|
59
|
+
data-testid="meshPolygonsVisibilitySwitch"
|
|
60
|
+
v-model="visibility"
|
|
61
|
+
/>
|
|
96
62
|
<template v-if="visibility">
|
|
97
63
|
<ViewerOptionsColoringTypeSelector
|
|
98
64
|
:id="id"
|
|
99
65
|
v-model:coloring_style_key="coloring_style_key"
|
|
100
66
|
v-model:color="color"
|
|
101
67
|
v-model:textures="textures"
|
|
102
|
-
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
103
|
-
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
104
|
-
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
105
|
-
v-model:polygon_attribute_name="polygon_attribute_name"
|
|
106
|
-
v-model:polygon_attribute_range="polygon_attribute_range"
|
|
107
|
-
v-model:polygon_attribute_color_map="polygon_attribute_color_map"
|
|
108
68
|
/>
|
|
109
69
|
</template>
|
|
110
70
|
</template>
|
|
@@ -87,9 +87,17 @@ const polyhedron_attribute_color_map = computed({
|
|
|
87
87
|
</script>
|
|
88
88
|
|
|
89
89
|
<template>
|
|
90
|
-
<ViewerContextMenuItem
|
|
90
|
+
<ViewerContextMenuItem
|
|
91
|
+
data-testid="meshPolyhedraMenu"
|
|
92
|
+
:itemProps="itemProps"
|
|
93
|
+
:tooltip="tooltip"
|
|
94
|
+
:btn_image="btn_image"
|
|
95
|
+
>
|
|
91
96
|
<template #options>
|
|
92
|
-
<ViewerOptionsVisibilitySwitch
|
|
97
|
+
<ViewerOptionsVisibilitySwitch
|
|
98
|
+
data-testid="meshPolyhedraVisibilitySwitch"
|
|
99
|
+
v-model="visibility"
|
|
100
|
+
/>
|
|
93
101
|
<template v-if="visibility">
|
|
94
102
|
<ViewerOptionsColoringTypeSelector
|
|
95
103
|
:id="id"
|
|
@@ -101,6 +109,10 @@ const polyhedron_attribute_color_map = computed({
|
|
|
101
109
|
v-model:polyhedron_attribute_name="polyhedron_attribute_name"
|
|
102
110
|
v-model:polyhedron_attribute_range="polyhedron_attribute_range"
|
|
103
111
|
v-model:polyhedron_attribute_color_map="polyhedron_attribute_color_map"
|
|
112
|
+
:capabilities="{
|
|
113
|
+
vertex: { available: true, hasColorMap: false },
|
|
114
|
+
polyhedron: { available: true, hasColorMap: true },
|
|
115
|
+
}"
|
|
104
116
|
/>
|
|
105
117
|
</template>
|
|
106
118
|
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import SurfacePoints from "@ogw_front/assets/viewer_svgs/surface_points.svg";
|
|
3
3
|
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem";
|
|
4
|
+
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size";
|
|
4
5
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch";
|
|
5
6
|
|
|
6
7
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -46,20 +47,7 @@ const size = computed({
|
|
|
46
47
|
<template v-if="visibility">
|
|
47
48
|
<v-row class="pa-0" align="center">
|
|
48
49
|
<v-divider />
|
|
49
|
-
<
|
|
50
|
-
<v-icon size="30" icon="mdi-ruler" v-tooltip:left="'Size'" />
|
|
51
|
-
</v-col>
|
|
52
|
-
<v-col justify="center">
|
|
53
|
-
<v-slider
|
|
54
|
-
v-model="size"
|
|
55
|
-
hide-details
|
|
56
|
-
min="0"
|
|
57
|
-
max="20"
|
|
58
|
-
step="2"
|
|
59
|
-
thumb-color="black"
|
|
60
|
-
ticks
|
|
61
|
-
/>
|
|
62
|
-
</v-col>
|
|
50
|
+
<ViewerOptionsSizeSlider data-testid="modelPointsSizeSlider" v-model="size" />
|
|
63
51
|
</v-row>
|
|
64
52
|
</template>
|
|
65
53
|
</template>
|
|
@@ -29,17 +29,50 @@ const polyhedron_attribute_name = defineModel("polyhedron_attribute_name");
|
|
|
29
29
|
const polyhedron_attribute_range = defineModel("polyhedron_attribute_range");
|
|
30
30
|
const polyhedron_attribute_color_map = defineModel("polyhedron_attribute_color_map");
|
|
31
31
|
|
|
32
|
-
const { id } = defineProps({
|
|
32
|
+
const { id, capabilities } = defineProps({
|
|
33
33
|
id: { type: String, required: true },
|
|
34
|
+
capabilities: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: () => ({}),
|
|
37
|
+
},
|
|
34
38
|
});
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
function isAvailable(key) {
|
|
41
|
+
if (capabilities[key] && capabilities[key].available === false) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function hasColorMap(key) {
|
|
48
|
+
if (capabilities[key] && capabilities[key].hasColorMap === false) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const has_color = computed(() => color.value !== undefined && isAvailable("color"));
|
|
55
|
+
const has_textures = computed(() => textures.value !== undefined && isAvailable("textures"));
|
|
56
|
+
const has_vertex = computed(
|
|
57
|
+
() =>
|
|
58
|
+
vertex_attribute_range.value !== undefined && isAvailable("vertex") && hasColorMap("vertex"),
|
|
59
|
+
);
|
|
60
|
+
const has_edge = computed(
|
|
61
|
+
() => edge_attribute_range.value !== undefined && isAvailable("edge") && hasColorMap("edge"),
|
|
62
|
+
);
|
|
63
|
+
const has_cells = computed(
|
|
64
|
+
() => cell_attribute_range.value !== undefined && isAvailable("cell") && hasColorMap("cell"),
|
|
65
|
+
);
|
|
66
|
+
const has_polygons = computed(
|
|
67
|
+
() =>
|
|
68
|
+
polygon_attribute_range.value !== undefined && isAvailable("polygon") && hasColorMap("polygon"),
|
|
69
|
+
);
|
|
70
|
+
const has_polyhedra = computed(
|
|
71
|
+
() =>
|
|
72
|
+
polyhedron_attribute_range.value !== undefined &&
|
|
73
|
+
isAvailable("polyhedron") &&
|
|
74
|
+
hasColorMap("polyhedron"),
|
|
75
|
+
);
|
|
43
76
|
|
|
44
77
|
const color_dict = { name: "Color", value: "color" };
|
|
45
78
|
const textures_dict = { name: "Textures", value: "textures" };
|
|
@@ -116,7 +149,7 @@ watch(coloring_style_label, (value) => {
|
|
|
116
149
|
<template v-if="coloring_style_key === textures_dict['value']">
|
|
117
150
|
<ViewerOptionsTexturesSelector v-model="textures" :id="id" />
|
|
118
151
|
</template>
|
|
119
|
-
<template v-if="coloring_style_key === vertex_dict['value']">
|
|
152
|
+
<template v-if="coloring_style_key === vertex_dict['value'] && hasColorMap('vertex')">
|
|
120
153
|
<ViewerOptionsAttributeSelector
|
|
121
154
|
v-model:name="vertex_attribute_name"
|
|
122
155
|
v-model:range="vertex_attribute_range"
|
|
@@ -125,7 +158,7 @@ watch(coloring_style_label, (value) => {
|
|
|
125
158
|
:schema="back_schemas.opengeodeweb_back.vertex_attribute_names"
|
|
126
159
|
/>
|
|
127
160
|
</template>
|
|
128
|
-
<template v-if="coloring_style_key === edge_dict['value']">
|
|
161
|
+
<template v-if="coloring_style_key === edge_dict['value'] && hasColorMap('edge')">
|
|
129
162
|
<ViewerOptionsAttributeSelector
|
|
130
163
|
v-model:name="edge_attribute_name"
|
|
131
164
|
v-model:range="edge_attribute_range"
|
|
@@ -134,7 +167,7 @@ watch(coloring_style_label, (value) => {
|
|
|
134
167
|
:schema="back_schemas.opengeodeweb_back.edge_attribute_names"
|
|
135
168
|
/>
|
|
136
169
|
</template>
|
|
137
|
-
<template v-if="coloring_style_key === cell_dict['value']">
|
|
170
|
+
<template v-if="coloring_style_key === cell_dict['value'] && hasColorMap('cell')">
|
|
138
171
|
<ViewerOptionsAttributeSelector
|
|
139
172
|
v-model:name="cell_attribute_name"
|
|
140
173
|
v-model:range="cell_attribute_range"
|
|
@@ -143,7 +176,7 @@ watch(coloring_style_label, (value) => {
|
|
|
143
176
|
:schema="back_schemas.opengeodeweb_back.cell_attribute_names"
|
|
144
177
|
/>
|
|
145
178
|
</template>
|
|
146
|
-
<template v-if="coloring_style_key === polygon_dict['value']">
|
|
179
|
+
<template v-if="coloring_style_key === polygon_dict['value'] && hasColorMap('polygon')">
|
|
147
180
|
<ViewerOptionsAttributeSelector
|
|
148
181
|
v-model:name="polygon_attribute_name"
|
|
149
182
|
v-model:range="polygon_attribute_range"
|
|
@@ -152,7 +185,9 @@ watch(coloring_style_label, (value) => {
|
|
|
152
185
|
:schema="back_schemas.opengeodeweb_back.polygon_attribute_names"
|
|
153
186
|
/>
|
|
154
187
|
</template>
|
|
155
|
-
<template
|
|
188
|
+
<template
|
|
189
|
+
v-if="coloring_style_key === polyhedron_dict['value'] && hasColorMap('polyhedron')"
|
|
190
|
+
>
|
|
156
191
|
<ViewerOptionsAttributeSelector
|
|
157
192
|
v-model:name="polyhedron_attribute_name"
|
|
158
193
|
v-model:range="polyhedron_attribute_range"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import BasicSlider from "@ogw_front/components/Basic/Slider";
|
|
3
|
+
|
|
4
|
+
const model = defineModel();
|
|
5
|
+
const { tooltip } = defineProps({
|
|
6
|
+
tooltip: { type: String, required: true },
|
|
7
|
+
});
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<v-col cols="auto" justify="center">
|
|
12
|
+
<v-icon size="30" icon="mdi-ruler" v-tooltip:left="tooltip" />
|
|
13
|
+
</v-col>
|
|
14
|
+
<v-col justify="center">
|
|
15
|
+
<BasicSlider v-model="model" />
|
|
16
|
+
</v-col>
|
|
17
|
+
</template>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import BasicSwitch from "@ogw_front/components/Basic/Switch";
|
|
3
|
+
|
|
2
4
|
const visibility = defineModel();
|
|
3
5
|
</script>
|
|
4
6
|
|
|
@@ -8,7 +10,7 @@ const visibility = defineModel();
|
|
|
8
10
|
<v-icon size="30" icon="mdi-eye" v-tooltip:left="'Visibility'" />
|
|
9
11
|
</v-col>
|
|
10
12
|
<v-col cols="auto" justify="center">
|
|
11
|
-
<
|
|
13
|
+
<BasicSwitch v-model="visibility" />
|
|
12
14
|
</v-col>
|
|
13
15
|
</v-row>
|
|
14
16
|
</template>
|
|
@@ -67,11 +67,7 @@ const vertex_attribute_color_map = computed({
|
|
|
67
67
|
});
|
|
68
68
|
</script>
|
|
69
69
|
<template>
|
|
70
|
-
<ViewerContextMenuItem
|
|
71
|
-
:itemProps="itemProps"
|
|
72
|
-
tooltip="Points options"
|
|
73
|
-
:btn_image="PointSetPoints"
|
|
74
|
-
>
|
|
70
|
+
<ViewerContextMenuItem :itemProps="itemProps" :btn_image="PointSetPoints">
|
|
75
71
|
<template #options>
|
|
76
72
|
<ViewerOptionsVisibilitySwitch v-model="visibility" />
|
|
77
73
|
<template v-if="visibility">
|
|
@@ -93,6 +89,7 @@ const vertex_attribute_color_map = computed({
|
|
|
93
89
|
v-model:vertex_attribute_name="vertex_attribute_name"
|
|
94
90
|
v-model:vertex_attribute_range="vertex_attribute_range"
|
|
95
91
|
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
|
|
92
|
+
:vertex_has_colormap="true"
|
|
96
93
|
/>
|
|
97
94
|
</v-col>
|
|
98
95
|
</v-row>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ViewerSpecificPolygonsOptions from "@ogw_front/components/Viewer/Surface/PolygonsOptions";
|
|
3
|
+
|
|
4
|
+
const { itemProps } = defineProps({
|
|
5
|
+
itemProps: { type: Object, required: true },
|
|
6
|
+
});
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<ViewerSpecificPolygonsOptions :itemProps="itemProps" tooltip="Triangles options" />
|
|
11
|
+
</template>
|
|
@@ -170,6 +170,9 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
function setContainer(container) {
|
|
173
|
+
if (!container.value) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
173
176
|
genericRenderWindow.value.setContainer(container.value.$el);
|
|
174
177
|
const webGLRenderWindow = genericRenderWindow.value.getApiSpecificRenderWindow();
|
|
175
178
|
webGLRenderWindow.setUseBackgroundImage(true);
|
package/app/stores/menu.js
CHANGED
|
@@ -5,15 +5,13 @@ import PointSetPointsOptions from "@ogw_front/components/Viewer/PointSet/Specifi
|
|
|
5
5
|
import EdgedCurveEdgesOptions from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesOptions";
|
|
6
6
|
import EdgedCurvePointsOptions from "@ogw_front/components/Viewer/EdgedCurve/PointsOptions";
|
|
7
7
|
|
|
8
|
-
//
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
8
|
+
// Surface components
|
|
9
|
+
import SurfaceEdgesOptions from "@ogw_front/components/Viewer/Surface/EdgesOptions";
|
|
10
|
+
import SurfacePointsOptions from "@ogw_front/components/Viewer/Surface/PointsOptions";
|
|
11
|
+
import SurfacePolygonsOptions from "@ogw_front/components/Viewer/Surface/PolygonsOptions";
|
|
12
12
|
|
|
13
13
|
// TriangulatedSurface components
|
|
14
|
-
import
|
|
15
|
-
import TriangulatedSurfacePointsOptions from "@ogw_front/components/Viewer/TriangulatedSurface/PointsOptions";
|
|
16
|
-
import TriangulatedSurfaceTrianglesOptions from "@ogw_front/components/Viewer/TriangulatedSurface/TrianglesOptions";
|
|
14
|
+
import TriangulatedSurfaceTrianglesOptions from "@ogw_front/components/Viewer/Surface/Triangulated/TrianglesOptions";
|
|
17
15
|
|
|
18
16
|
// Grid 2D components
|
|
19
17
|
import Grid2DCellsOptions from "@ogw_front/components/Viewer/Grid/2D/CellsOptions";
|
|
@@ -44,15 +42,11 @@ const PointSet_menu = [PointSetPointsOptions];
|
|
|
44
42
|
|
|
45
43
|
const EdgedCurve_menu = [EdgedCurvePointsOptions, EdgedCurveEdgesOptions];
|
|
46
44
|
|
|
47
|
-
const PolygonalSurface_menu = [
|
|
48
|
-
PolygonalSurfacePointsOptions,
|
|
49
|
-
PolygonalSurfaceEdgesOptions,
|
|
50
|
-
PolygonalSurfacePolygonsOptions,
|
|
51
|
-
];
|
|
45
|
+
const PolygonalSurface_menu = [SurfacePointsOptions, SurfaceEdgesOptions, SurfacePolygonsOptions];
|
|
52
46
|
|
|
53
47
|
const TriangulatedSurface_menu = [
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
SurfacePointsOptions,
|
|
49
|
+
SurfaceEdgesOptions,
|
|
56
50
|
TriangulatedSurfaceTrianglesOptions,
|
|
57
51
|
];
|
|
58
52
|
|