@geode/opengeodeweb-front 10.3.1 → 10.3.2-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/Viewer/EdgedCurve/SpecificEdgesOptions.vue +0 -2
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +0 -4
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +59 -0
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +31 -0
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +68 -0
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +71 -0
- package/app/components/Viewer/Options/AttributeColorBar.vue +2 -0
- package/app/components/Viewer/Options/AttributeSelector.vue +112 -0
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +31 -29
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +0 -2
- package/app/components/Viewer/PolygonalSurface/SpecificPolygonsOptions.vue +0 -4
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +0 -4
- package/internal/stores/data_style/mesh/cells/cell.js +20 -34
- package/internal/stores/data_style/mesh/cells/vertex.js +20 -34
- package/internal/stores/data_style/mesh/edges/edge.js +84 -86
- package/internal/stores/data_style/mesh/edges/vertex.js +20 -34
- package/internal/stores/data_style/mesh/points/vertex.js +20 -34
- package/internal/stores/data_style/mesh/polygons/polygon.js +23 -38
- package/internal/stores/data_style/mesh/polygons/vertex.js +20 -34
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +19 -32
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +20 -34
- package/package.json +3 -3
- package/tests/integration/microservices/viewer/requirements.txt +1 -1
- package/app/components/Viewer/Options/CellAttributeSelector.vue +0 -87
- package/app/components/Viewer/Options/EdgeAttributeSelector.vue +0 -84
- package/app/components/Viewer/Options/PolygonAttributeSelector.vue +0 -85
- package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +0 -91
- package/app/components/Viewer/Options/VertexAttributeSelector.vue +0 -84
|
@@ -18,26 +18,15 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
18
18
|
return meshCellsCommonStyle.meshCellsColoring(id).cell
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async function updateMeshCellsCellAttribute(id) {
|
|
22
|
-
const name = meshCellsCellAttributeName(id)
|
|
23
|
-
const storedConfig = meshCellsCellAttributeStoredConfig(id, name)
|
|
24
|
-
await meshCellsCellAttributeRange(
|
|
25
|
-
id,
|
|
26
|
-
storedConfig.minimum,
|
|
27
|
-
storedConfig.maximum,
|
|
28
|
-
)
|
|
29
|
-
await meshCellsCellAttributeColorMap(id, storedConfig.colorMap)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
function meshCellsCellAttributeStoredConfig(id, name) {
|
|
33
22
|
const { storedConfigs } = meshCellsCellAttribute(id)
|
|
34
23
|
if (name in storedConfigs) {
|
|
35
24
|
return storedConfigs[name]
|
|
36
25
|
}
|
|
37
26
|
return setMeshCellsCellAttributeStoredConfig(id, name, {
|
|
38
|
-
minimum:
|
|
39
|
-
maximum:
|
|
40
|
-
colorMap:
|
|
27
|
+
minimum: undefined,
|
|
28
|
+
maximum: undefined,
|
|
29
|
+
colorMap: undefined,
|
|
41
30
|
})
|
|
42
31
|
}
|
|
43
32
|
|
|
@@ -46,7 +35,7 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
46
35
|
name,
|
|
47
36
|
{ minimum, maximum, colorMap },
|
|
48
37
|
) {
|
|
49
|
-
const
|
|
38
|
+
const storedConfigs = meshCellsCellAttribute(id).storedConfigs
|
|
50
39
|
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
51
40
|
return storedConfigs[name]
|
|
52
41
|
}
|
|
@@ -67,10 +56,11 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
67
56
|
{
|
|
68
57
|
response_function: async () => {
|
|
69
58
|
meshCellsCellAttribute(id).name = name
|
|
70
|
-
const { minimum, maximum
|
|
71
|
-
|
|
59
|
+
const { minimum, maximum } = meshCellsCellAttributeStoredConfig(
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
)
|
|
72
63
|
await setMeshCellsCellAttributeRange(id, minimum, maximum)
|
|
73
|
-
await setMeshCellsCellAttributeColorMap(id, colorMap)
|
|
74
64
|
console.log(
|
|
75
65
|
setMeshCellsCellAttributeName.name,
|
|
76
66
|
{ id },
|
|
@@ -90,21 +80,9 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
90
80
|
function setMeshCellsCellAttributeRange(id, minimum, maximum) {
|
|
91
81
|
const name = meshCellsCellAttributeName(id)
|
|
92
82
|
const storedConfig = meshCellsCellAttributeStoredConfig(id, name)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
response_function: () => {
|
|
98
|
-
storedConfig.minimum = minimum
|
|
99
|
-
storedConfig.maximum = maximum
|
|
100
|
-
console.log(
|
|
101
|
-
setMeshCellsCellAttributeRange.name,
|
|
102
|
-
{ id },
|
|
103
|
-
meshCellsCellAttributeRange(id),
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
)
|
|
83
|
+
storedConfig.minimum = minimum
|
|
84
|
+
storedConfig.maximum = maximum
|
|
85
|
+
return setMeshCellsCellAttributeColorMap(id, storedConfig.colorMap)
|
|
108
86
|
}
|
|
109
87
|
|
|
110
88
|
function meshCellsCellAttributeColorMap(id) {
|
|
@@ -116,6 +94,14 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
116
94
|
function setMeshCellsCellAttributeColorMap(id, colorMap) {
|
|
117
95
|
const name = meshCellsCellAttributeName(id)
|
|
118
96
|
const storedConfig = meshCellsCellAttributeStoredConfig(id, name)
|
|
97
|
+
if (
|
|
98
|
+
storedConfig.minimum === undefined ||
|
|
99
|
+
storedConfig.maximum === undefined ||
|
|
100
|
+
colorMap === undefined
|
|
101
|
+
) {
|
|
102
|
+
storedConfig.colorMap = colorMap
|
|
103
|
+
return
|
|
104
|
+
}
|
|
119
105
|
const points = getRGBPointsFromPreset(colorMap)
|
|
120
106
|
const { minimum, maximum } = storedConfig
|
|
121
107
|
|
|
@@ -145,9 +131,9 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
145
131
|
meshCellsCellAttributeName,
|
|
146
132
|
meshCellsCellAttributeRange,
|
|
147
133
|
meshCellsCellAttributeColorMap,
|
|
134
|
+
meshCellsCellAttributeStoredConfig,
|
|
148
135
|
setMeshCellsCellAttributeName,
|
|
149
136
|
setMeshCellsCellAttributeRange,
|
|
150
137
|
setMeshCellsCellAttributeColorMap,
|
|
151
|
-
updateMeshCellsCellAttribute,
|
|
152
138
|
}
|
|
153
139
|
}
|
|
@@ -18,26 +18,15 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
18
18
|
return meshCellsCommonStyle.meshCellsColoring(id).vertex
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async function updateMeshCellsVertexAttribute(id) {
|
|
22
|
-
const name = meshCellsVertexAttributeName(id)
|
|
23
|
-
const storedConfig = meshCellsVertexAttributeStoredConfig(id, name)
|
|
24
|
-
await meshCellsVertexAttributeRange(
|
|
25
|
-
id,
|
|
26
|
-
storedConfig.minimum,
|
|
27
|
-
storedConfig.maximum,
|
|
28
|
-
)
|
|
29
|
-
await meshCellsVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
function meshCellsVertexAttributeStoredConfig(id, name) {
|
|
33
22
|
const { storedConfigs } = meshCellsVertexAttribute(id)
|
|
34
23
|
if (name in storedConfigs) {
|
|
35
24
|
return storedConfigs[name]
|
|
36
25
|
}
|
|
37
26
|
return setMeshCellsVertexAttributeStoredConfig(id, name, {
|
|
38
|
-
minimum:
|
|
39
|
-
maximum:
|
|
40
|
-
colorMap:
|
|
27
|
+
minimum: undefined,
|
|
28
|
+
maximum: undefined,
|
|
29
|
+
colorMap: undefined,
|
|
41
30
|
})
|
|
42
31
|
}
|
|
43
32
|
|
|
@@ -46,7 +35,7 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
46
35
|
name,
|
|
47
36
|
{ minimum, maximum, colorMap },
|
|
48
37
|
) {
|
|
49
|
-
const
|
|
38
|
+
const storedConfigs = meshCellsVertexAttribute(id).storedConfigs
|
|
50
39
|
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
51
40
|
return storedConfigs[name]
|
|
52
41
|
}
|
|
@@ -67,10 +56,11 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
67
56
|
{
|
|
68
57
|
response_function: async () => {
|
|
69
58
|
meshCellsVertexAttribute(id).name = name
|
|
70
|
-
const { minimum, maximum
|
|
71
|
-
|
|
59
|
+
const { minimum, maximum } = meshCellsVertexAttributeStoredConfig(
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
)
|
|
72
63
|
await setMeshCellsVertexAttributeRange(id, minimum, maximum)
|
|
73
|
-
await setMeshCellsVertexAttributeColorMap(id, colorMap)
|
|
74
64
|
console.log(
|
|
75
65
|
setMeshCellsVertexAttributeName.name,
|
|
76
66
|
{ id },
|
|
@@ -90,21 +80,9 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
90
80
|
function setMeshCellsVertexAttributeRange(id, minimum, maximum) {
|
|
91
81
|
const name = meshCellsVertexAttributeName(id)
|
|
92
82
|
const storedConfig = meshCellsVertexAttributeStoredConfig(id, name)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
response_function: () => {
|
|
98
|
-
storedConfig.minimum = minimum
|
|
99
|
-
storedConfig.maximum = maximum
|
|
100
|
-
console.log(
|
|
101
|
-
setMeshCellsVertexAttributeRange.name,
|
|
102
|
-
{ id },
|
|
103
|
-
meshCellsVertexAttributeRange(id),
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
)
|
|
83
|
+
storedConfig.minimum = minimum
|
|
84
|
+
storedConfig.maximum = maximum
|
|
85
|
+
return setMeshCellsVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
108
86
|
}
|
|
109
87
|
|
|
110
88
|
function meshCellsVertexAttributeColorMap(id) {
|
|
@@ -116,6 +94,14 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
116
94
|
function setMeshCellsVertexAttributeColorMap(id, colorMap) {
|
|
117
95
|
const name = meshCellsVertexAttributeName(id)
|
|
118
96
|
const storedConfig = meshCellsVertexAttributeStoredConfig(id, name)
|
|
97
|
+
if (
|
|
98
|
+
storedConfig.minimum === undefined ||
|
|
99
|
+
storedConfig.maximum === undefined ||
|
|
100
|
+
colorMap === undefined
|
|
101
|
+
) {
|
|
102
|
+
storedConfig.colorMap = colorMap
|
|
103
|
+
return
|
|
104
|
+
}
|
|
119
105
|
const points = getRGBPointsFromPreset(colorMap)
|
|
120
106
|
const { minimum, maximum } = storedConfig
|
|
121
107
|
|
|
@@ -145,9 +131,9 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
145
131
|
meshCellsVertexAttributeName,
|
|
146
132
|
meshCellsVertexAttributeRange,
|
|
147
133
|
meshCellsVertexAttributeColorMap,
|
|
134
|
+
meshCellsVertexAttributeStoredConfig,
|
|
148
135
|
setMeshCellsVertexAttributeName,
|
|
149
136
|
setMeshCellsVertexAttributeRange,
|
|
150
137
|
setMeshCellsVertexAttributeColorMap,
|
|
151
|
-
updateMeshCellsVertexAttribute,
|
|
152
138
|
}
|
|
153
139
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
|
-
|
|
5
|
+
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap"
|
|
6
6
|
import { useMeshEdgesCommonStyle } from "./common"
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer"
|
|
8
8
|
|
|
@@ -18,27 +18,27 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
18
18
|
return meshEdgesCommonStyle.meshEdgesColoring(id).edge
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
function meshEdgesEdgeAttributeStoredConfig(id, name) {
|
|
22
|
+
const storedConfigs = meshEdgesEdgeAttribute(id).storedConfigs
|
|
23
|
+
if (name in storedConfigs) {
|
|
24
|
+
return storedConfigs[name]
|
|
25
|
+
}
|
|
26
|
+
return setMeshEdgesEdgeAttributeStoredConfig(id, name, {
|
|
27
|
+
minimum: undefined,
|
|
28
|
+
maximum: undefined,
|
|
29
|
+
colorMap: undefined,
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
function setMeshEdgesEdgeAttributeStoredConfig(
|
|
34
|
+
id,
|
|
35
|
+
name,
|
|
36
|
+
{ minimum, maximum, colorMap },
|
|
37
|
+
) {
|
|
38
|
+
const storedConfigs = meshEdgesEdgeAttribute(id).storedConfigs
|
|
39
|
+
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
40
|
+
return storedConfigs[name]
|
|
41
|
+
}
|
|
42
42
|
|
|
43
43
|
function meshEdgesEdgeAttributeName(id) {
|
|
44
44
|
console.log(
|
|
@@ -56,10 +56,11 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
56
56
|
{
|
|
57
57
|
response_function: async () => {
|
|
58
58
|
meshEdgesEdgeAttribute(id).name = name
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
const { minimum, maximum } = meshEdgesEdgeAttributeStoredConfig(
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
)
|
|
63
|
+
await setMeshEdgesEdgeAttributeRange(id, minimum, maximum)
|
|
63
64
|
console.log(
|
|
64
65
|
setMeshEdgesEdgeAttributeName.name,
|
|
65
66
|
{ id },
|
|
@@ -70,72 +71,69 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
70
71
|
)
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// response_function: () => {
|
|
87
|
-
// storedConfig.minimum = minimum
|
|
88
|
-
// storedConfig.maximum = maximum
|
|
89
|
-
// console.log(
|
|
90
|
-
// setMeshEdgesEdgeAttributeRange.name,
|
|
91
|
-
// { id },
|
|
92
|
-
// meshEdgesEdgeAttributeRange(id),
|
|
93
|
-
// )
|
|
94
|
-
// },
|
|
95
|
-
// },
|
|
96
|
-
// )
|
|
97
|
-
// }
|
|
74
|
+
function meshEdgesEdgeAttributeRange(id) {
|
|
75
|
+
const name = meshEdgesEdgeAttributeName(id)
|
|
76
|
+
const storedConfig = meshEdgesEdgeAttributeStoredConfig(id, name)
|
|
77
|
+
const { minimum, maximum } = storedConfig
|
|
78
|
+
return [minimum, maximum]
|
|
79
|
+
}
|
|
80
|
+
function setMeshEdgesEdgeAttributeRange(id, minimum, maximum) {
|
|
81
|
+
const name = meshEdgesEdgeAttributeName(id)
|
|
82
|
+
const storedConfig = meshEdgesEdgeAttributeStoredConfig(id, name)
|
|
83
|
+
storedConfig.minimum = minimum
|
|
84
|
+
storedConfig.maximum = maximum
|
|
85
|
+
return setMeshEdgesEdgeAttributeColorMap(id, storedConfig.colorMap)
|
|
86
|
+
}
|
|
98
87
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
88
|
+
function meshEdgesEdgeAttributeColorMap(id) {
|
|
89
|
+
const name = meshEdgesEdgeAttributeName(id)
|
|
90
|
+
const storedConfig = meshEdgesEdgeAttributeStoredConfig(id, name)
|
|
91
|
+
const { colorMap } = storedConfig
|
|
92
|
+
return colorMap
|
|
93
|
+
}
|
|
94
|
+
function setMeshEdgesEdgeAttributeColorMap(id, colorMap) {
|
|
95
|
+
const name = meshEdgesEdgeAttributeName(id)
|
|
96
|
+
const storedConfig = meshEdgesEdgeAttributeStoredConfig(id, name)
|
|
97
|
+
if (
|
|
98
|
+
storedConfig.minimum === undefined ||
|
|
99
|
+
storedConfig.maximum === undefined ||
|
|
100
|
+
colorMap === undefined
|
|
101
|
+
) {
|
|
102
|
+
storedConfig.colorMap = colorMap
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
const points = getRGBPointsFromPreset(colorMap)
|
|
106
|
+
const { minimum, maximum } = storedConfig
|
|
110
107
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
108
|
+
console.log(setMeshEdgesEdgeAttributeColorMap.name, {
|
|
109
|
+
id,
|
|
110
|
+
minimum,
|
|
111
|
+
maximum,
|
|
112
|
+
colorMap,
|
|
113
|
+
})
|
|
114
|
+
return viewerStore.request(
|
|
115
|
+
meshEdgesEdgeAttributeSchemas.color_map,
|
|
116
|
+
{ id, points, minimum, maximum },
|
|
117
|
+
{
|
|
118
|
+
response_function: () => {
|
|
119
|
+
storedConfig.colorMap = colorMap
|
|
120
|
+
console.log(
|
|
121
|
+
setMeshEdgesEdgeAttributeColorMap.name,
|
|
122
|
+
{ id },
|
|
123
|
+
meshEdgesEdgeAttributeColorMap(id),
|
|
124
|
+
)
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
)
|
|
128
|
+
}
|
|
132
129
|
|
|
133
130
|
return {
|
|
134
131
|
meshEdgesEdgeAttributeName,
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
meshEdgesEdgeAttributeRange,
|
|
133
|
+
meshEdgesEdgeAttributeColorMap,
|
|
134
|
+
meshEdgesEdgeAttributeStoredConfig,
|
|
137
135
|
setMeshEdgesEdgeAttributeName,
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
setMeshEdgesEdgeAttributeRange,
|
|
137
|
+
setMeshEdgesEdgeAttributeColorMap,
|
|
140
138
|
}
|
|
141
139
|
}
|
|
@@ -18,26 +18,15 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
18
18
|
return meshEdgesCommonStyle.meshEdgesColoring(id).vertex
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async function updateMeshEdgesVertexAttribute(id) {
|
|
22
|
-
const name = meshEdgesVertexAttributeName(id)
|
|
23
|
-
const storedConfig = meshEdgesVertexAttributeStoredConfig(id, name)
|
|
24
|
-
await meshEdgesVertexAttributeRange(
|
|
25
|
-
id,
|
|
26
|
-
storedConfig.minimum,
|
|
27
|
-
storedConfig.maximum,
|
|
28
|
-
)
|
|
29
|
-
await meshEdgesVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
function meshEdgesVertexAttributeStoredConfig(id, name) {
|
|
33
22
|
const { storedConfigs } = meshEdgesVertexAttribute(id)
|
|
34
23
|
if (name in storedConfigs) {
|
|
35
24
|
return storedConfigs[name]
|
|
36
25
|
}
|
|
37
26
|
return setMeshEdgesVertexAttributeStoredConfig(id, name, {
|
|
38
|
-
minimum:
|
|
39
|
-
maximum:
|
|
40
|
-
colorMap:
|
|
27
|
+
minimum: undefined,
|
|
28
|
+
maximum: undefined,
|
|
29
|
+
colorMap: undefined,
|
|
41
30
|
})
|
|
42
31
|
}
|
|
43
32
|
|
|
@@ -46,7 +35,7 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
46
35
|
name,
|
|
47
36
|
{ minimum, maximum, colorMap },
|
|
48
37
|
) {
|
|
49
|
-
const
|
|
38
|
+
const storedConfigs = meshEdgesVertexAttribute(id).storedConfigs
|
|
50
39
|
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
51
40
|
return storedConfigs[name]
|
|
52
41
|
}
|
|
@@ -67,10 +56,11 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
67
56
|
{
|
|
68
57
|
response_function: async () => {
|
|
69
58
|
meshEdgesVertexAttribute(id).name = name
|
|
70
|
-
const { minimum, maximum
|
|
71
|
-
|
|
59
|
+
const { minimum, maximum } = meshEdgesVertexAttributeStoredConfig(
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
)
|
|
72
63
|
await setMeshEdgesVertexAttributeRange(id, minimum, maximum)
|
|
73
|
-
await setMeshEdgesVertexAttributeColorMap(id, colorMap)
|
|
74
64
|
console.log(
|
|
75
65
|
setMeshEdgesVertexAttributeName.name,
|
|
76
66
|
{ id },
|
|
@@ -90,21 +80,9 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
90
80
|
function setMeshEdgesVertexAttributeRange(id, minimum, maximum) {
|
|
91
81
|
const name = meshEdgesVertexAttributeName(id)
|
|
92
82
|
const storedConfig = meshEdgesVertexAttributeStoredConfig(id, name)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
response_function: () => {
|
|
98
|
-
storedConfig.minimum = minimum
|
|
99
|
-
storedConfig.maximum = maximum
|
|
100
|
-
console.log(
|
|
101
|
-
setMeshEdgesVertexAttributeRange.name,
|
|
102
|
-
{ id },
|
|
103
|
-
meshEdgesVertexAttributeRange(id),
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
)
|
|
83
|
+
storedConfig.minimum = minimum
|
|
84
|
+
storedConfig.maximum = maximum
|
|
85
|
+
return setMeshEdgesVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
108
86
|
}
|
|
109
87
|
|
|
110
88
|
function meshEdgesVertexAttributeColorMap(id) {
|
|
@@ -116,6 +94,14 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
116
94
|
function setMeshEdgesVertexAttributeColorMap(id, colorMap) {
|
|
117
95
|
const name = meshEdgesVertexAttributeName(id)
|
|
118
96
|
const storedConfig = meshEdgesVertexAttributeStoredConfig(id, name)
|
|
97
|
+
if (
|
|
98
|
+
storedConfig.minimum === undefined ||
|
|
99
|
+
storedConfig.maximum === undefined ||
|
|
100
|
+
colorMap === undefined
|
|
101
|
+
) {
|
|
102
|
+
storedConfig.colorMap = colorMap
|
|
103
|
+
return
|
|
104
|
+
}
|
|
119
105
|
const points = getRGBPointsFromPreset(colorMap)
|
|
120
106
|
const { minimum, maximum } = storedConfig
|
|
121
107
|
|
|
@@ -145,9 +131,9 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
145
131
|
meshEdgesVertexAttributeName,
|
|
146
132
|
meshEdgesVertexAttributeRange,
|
|
147
133
|
meshEdgesVertexAttributeColorMap,
|
|
134
|
+
meshEdgesVertexAttributeStoredConfig,
|
|
148
135
|
setMeshEdgesVertexAttributeName,
|
|
149
136
|
setMeshEdgesVertexAttributeRange,
|
|
150
137
|
setMeshEdgesVertexAttributeColorMap,
|
|
151
|
-
updateMeshEdgesVertexAttribute,
|
|
152
138
|
}
|
|
153
139
|
}
|
|
@@ -18,26 +18,15 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
18
18
|
return meshPointsCommonStyle.meshPointsColoring(id).vertex
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
async function updateMeshPointsVertexAttribute(id) {
|
|
22
|
-
const name = meshPointsVertexAttributeName(id)
|
|
23
|
-
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
24
|
-
await meshPointsVertexAttributeRange(
|
|
25
|
-
id,
|
|
26
|
-
storedConfig.minimum,
|
|
27
|
-
storedConfig.maximum,
|
|
28
|
-
)
|
|
29
|
-
await meshPointsVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
21
|
function meshPointsVertexAttributeStoredConfig(id, name) {
|
|
33
22
|
const { storedConfigs } = meshPointsVertexAttribute(id)
|
|
34
23
|
if (name in storedConfigs) {
|
|
35
24
|
return storedConfigs[name]
|
|
36
25
|
}
|
|
37
26
|
return setMeshPointsVertexAttributeStoredConfig(id, name, {
|
|
38
|
-
minimum:
|
|
39
|
-
maximum:
|
|
40
|
-
colorMap:
|
|
27
|
+
minimum: undefined,
|
|
28
|
+
maximum: undefined,
|
|
29
|
+
colorMap: undefined,
|
|
41
30
|
})
|
|
42
31
|
}
|
|
43
32
|
|
|
@@ -46,7 +35,7 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
46
35
|
name,
|
|
47
36
|
{ minimum, maximum, colorMap },
|
|
48
37
|
) {
|
|
49
|
-
const
|
|
38
|
+
const storedConfigs = meshPointsVertexAttribute(id).storedConfigs
|
|
50
39
|
storedConfigs[name] = { minimum, maximum, colorMap }
|
|
51
40
|
return storedConfigs[name]
|
|
52
41
|
}
|
|
@@ -67,10 +56,11 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
67
56
|
{
|
|
68
57
|
response_function: async () => {
|
|
69
58
|
meshPointsVertexAttribute(id).name = name
|
|
70
|
-
const { minimum, maximum
|
|
71
|
-
|
|
59
|
+
const { minimum, maximum } = meshPointsVertexAttributeStoredConfig(
|
|
60
|
+
id,
|
|
61
|
+
name,
|
|
62
|
+
)
|
|
72
63
|
await setMeshPointsVertexAttributeRange(id, minimum, maximum)
|
|
73
|
-
await setMeshPointsVertexAttributeColorMap(id, colorMap)
|
|
74
64
|
console.log(
|
|
75
65
|
setMeshPointsVertexAttributeName.name,
|
|
76
66
|
{ id },
|
|
@@ -90,21 +80,9 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
90
80
|
function setMeshPointsVertexAttributeRange(id, minimum, maximum) {
|
|
91
81
|
const name = meshPointsVertexAttributeName(id)
|
|
92
82
|
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
{
|
|
97
|
-
response_function: () => {
|
|
98
|
-
storedConfig.minimum = minimum
|
|
99
|
-
storedConfig.maximum = maximum
|
|
100
|
-
console.log(
|
|
101
|
-
setMeshPointsVertexAttributeRange.name,
|
|
102
|
-
{ id },
|
|
103
|
-
meshPointsVertexAttributeRange(id),
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
)
|
|
83
|
+
storedConfig.minimum = minimum
|
|
84
|
+
storedConfig.maximum = maximum
|
|
85
|
+
return setMeshPointsVertexAttributeColorMap(id, storedConfig.colorMap)
|
|
108
86
|
}
|
|
109
87
|
|
|
110
88
|
function meshPointsVertexAttributeColorMap(id) {
|
|
@@ -116,6 +94,14 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
116
94
|
function setMeshPointsVertexAttributeColorMap(id, colorMap) {
|
|
117
95
|
const name = meshPointsVertexAttributeName(id)
|
|
118
96
|
const storedConfig = meshPointsVertexAttributeStoredConfig(id, name)
|
|
97
|
+
if (
|
|
98
|
+
storedConfig.minimum === undefined ||
|
|
99
|
+
storedConfig.maximum === undefined ||
|
|
100
|
+
colorMap === undefined
|
|
101
|
+
) {
|
|
102
|
+
storedConfig.colorMap = colorMap
|
|
103
|
+
return
|
|
104
|
+
}
|
|
119
105
|
const points = getRGBPointsFromPreset(colorMap)
|
|
120
106
|
const { minimum, maximum } = storedConfig
|
|
121
107
|
|
|
@@ -145,9 +131,9 @@ export function useMeshPointsVertexAttributeStyle() {
|
|
|
145
131
|
meshPointsVertexAttributeName,
|
|
146
132
|
meshPointsVertexAttributeRange,
|
|
147
133
|
meshPointsVertexAttributeColorMap,
|
|
134
|
+
meshPointsVertexAttributeStoredConfig,
|
|
148
135
|
setMeshPointsVertexAttributeName,
|
|
149
136
|
setMeshPointsVertexAttributeRange,
|
|
150
137
|
setMeshPointsVertexAttributeColorMap,
|
|
151
|
-
updateMeshPointsVertexAttribute,
|
|
152
138
|
}
|
|
153
139
|
}
|