@geode/opengeodeweb-front 10.14.2-rc.2 → 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.
@@ -46,48 +46,6 @@ const color = computed({
46
46
  hybridViewerStore.remoteRender();
47
47
  },
48
48
  });
49
- const vertex_attribute_name = computed({
50
- get: () => dataStyleStore.meshEdgesVertexAttributeName(id.value),
51
- set: async (newValue) => {
52
- await dataStyleStore.setMeshEdgesVertexAttributeName(id.value, newValue);
53
- hybridViewerStore.remoteRender();
54
- },
55
- });
56
- const vertex_attribute_range = computed({
57
- get: () => dataStyleStore.meshEdgesVertexAttributeRange(id.value),
58
- set: async (newValue) => {
59
- await dataStyleStore.setMeshEdgesVertexAttributeRange(id.value, newValue[0], newValue[1]);
60
- hybridViewerStore.remoteRender();
61
- },
62
- });
63
- const vertex_attribute_color_map = computed({
64
- get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id.value),
65
- set: async (newValue) => {
66
- await dataStyleStore.setMeshEdgesVertexAttributeColorMap(id.value, newValue);
67
- hybridViewerStore.remoteRender();
68
- },
69
- });
70
- const edge_attribute_name = computed({
71
- get: () => dataStyleStore.meshEdgesEdgeAttributeName(id.value),
72
- set: async (newValue) => {
73
- await dataStyleStore.setMeshEdgesEdgeAttributeName(id.value, newValue);
74
- hybridViewerStore.remoteRender();
75
- },
76
- });
77
- const edge_attribute_range = computed({
78
- get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id.value),
79
- set: async (newValue) => {
80
- await dataStyleStore.setMeshEdgesEdgeAttributeRange(id.value, newValue[0], newValue[1]);
81
- hybridViewerStore.remoteRender();
82
- },
83
- });
84
- const edge_attribute_color_map = computed({
85
- get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value),
86
- set: async (newValue) => {
87
- await dataStyleStore.setMeshEdgesEdgeAttributeColorMap(id.value, newValue);
88
- hybridViewerStore.remoteRender();
89
- },
90
- });
91
49
  </script>
92
50
 
93
51
  <template>
@@ -110,12 +68,6 @@ const edge_attribute_color_map = computed({
110
68
  :id="id"
111
69
  v-model:coloring_style_key="coloring_style_key"
112
70
  v-model:color="color"
113
- v-model:vertex_attribute_name="vertex_attribute_name"
114
- v-model:vertex_attribute_range="vertex_attribute_range"
115
- v-model:vertex_attribute_color_map="vertex_attribute_color_map"
116
- v-model:edge_attribute_name="edge_attribute_name"
117
- v-model:edge_attribute_range="edge_attribute_range"
118
- v-model:edge_attribute_color_map="edge_attribute_color_map"
119
71
  />
120
72
  </v-col>
121
73
  </v-row>
@@ -95,6 +95,7 @@ const vertex_attribute_color_map = computed({
95
95
  v-model:vertex_attribute_name="vertex_attribute_name"
96
96
  v-model:vertex_attribute_range="vertex_attribute_range"
97
97
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
98
+ :capabilities="{ vertex: { available: false } }"
98
99
  />
99
100
  </v-col>
100
101
  </v-row>
@@ -45,48 +45,6 @@ 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>
@@ -107,12 +65,6 @@ const polygon_attribute_color_map = computed({
107
65
  v-model:coloring_style_key="coloring_style_key"
108
66
  v-model:color="color"
109
67
  v-model:textures="textures"
110
- v-model:vertex_attribute_name="vertex_attribute_name"
111
- v-model:vertex_attribute_range="vertex_attribute_range"
112
- v-model:vertex_attribute_color_map="vertex_attribute_color_map"
113
- v-model:polygon_attribute_name="polygon_attribute_name"
114
- v-model:polygon_attribute_range="polygon_attribute_range"
115
- v-model:polygon_attribute_color_map="polygon_attribute_color_map"
116
68
  />
117
69
  </template>
118
70
  </template>
@@ -109,6 +109,10 @@ const polyhedron_attribute_color_map = computed({
109
109
  v-model:polyhedron_attribute_name="polyhedron_attribute_name"
110
110
  v-model:polyhedron_attribute_range="polyhedron_attribute_range"
111
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
+ }"
112
116
  />
113
117
  </template>
114
118
  </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
- const has_color = computed(() => color.value !== undefined);
37
- const has_textures = computed(() => textures.value !== undefined);
38
- const has_vertex = computed(() => vertex_attribute_range.value !== undefined);
39
- const has_edge = computed(() => edge_attribute_range.value !== undefined);
40
- const has_cells = computed(() => cell_attribute_range.value !== undefined);
41
- const has_polygons = computed(() => polygon_attribute_range.value !== undefined);
42
- const has_polyhedra = computed(() => polyhedron_attribute_range.value !== undefined);
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 v-if="coloring_style_key === polyhedron_dict['value']">
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"
@@ -89,6 +89,7 @@ const vertex_attribute_color_map = computed({
89
89
  v-model:vertex_attribute_name="vertex_attribute_name"
90
90
  v-model:vertex_attribute_range="vertex_attribute_range"
91
91
  v-model:vertex_attribute_color_map="vertex_attribute_color_map"
92
+ :vertex_has_colormap="true"
92
93
  />
93
94
  </v-col>
94
95
  </v-row>
@@ -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);
@@ -49,12 +49,28 @@ function useMeshPointsVertexAttributeConfig() {
49
49
  return meshPointsVertexAttribute(id).name;
50
50
  }
51
51
 
52
+ function meshPointsVertexAttributeRange(id) {
53
+ const name = meshPointsVertexAttributeName(id);
54
+ const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
55
+ const { minimum, maximum } = storedConfig;
56
+ return [minimum, maximum];
57
+ }
58
+
59
+ function meshPointsVertexAttributeColorMap(id) {
60
+ const name = meshPointsVertexAttributeName(id);
61
+ const storedConfig = meshPointsVertexAttributeStoredConfig(id, name);
62
+ const { colorMap } = storedConfig;
63
+ return colorMap;
64
+ }
65
+
52
66
  return {
53
67
  meshPointsVertexAttribute,
54
68
  meshPointsVertexAttributeStoredConfig,
55
69
  setMeshPointsVertexAttributeStoredConfig,
56
70
  mutateMeshPointsVertexStyle,
57
71
  meshPointsVertexAttributeName,
72
+ meshPointsVertexAttributeRange,
73
+ meshPointsVertexAttributeColorMap,
58
74
  };
59
75
  }
60
76
 
@@ -133,23 +149,7 @@ export function useMeshPointsVertexAttributeStyle() {
133
149
  const config = useMeshPointsVertexAttributeConfig();
134
150
  const actions = useMeshPointsVertexAttributeActions();
135
151
 
136
- function meshPointsVertexAttributeRange(id) {
137
- const name = config.meshPointsVertexAttributeName(id);
138
- const storedConfig = config.meshPointsVertexAttributeStoredConfig(id, name);
139
- const { minimum, maximum } = storedConfig;
140
- return [minimum, maximum];
141
- }
142
-
143
- function meshPointsVertexAttributeColorMap(id) {
144
- const name = config.meshPointsVertexAttributeName(id);
145
- const storedConfig = config.meshPointsVertexAttributeStoredConfig(id, name);
146
- const { colorMap } = storedConfig;
147
- return colorMap;
148
- }
149
-
150
152
  return {
151
- meshPointsVertexAttributeRange,
152
- meshPointsVertexAttributeColorMap,
153
153
  ...config,
154
154
  ...actions,
155
155
  };
@@ -49,12 +49,28 @@ function useMeshPolyhedraPolyhedronAttributeConfig() {
49
49
  return meshPolyhedraPolyhedronAttribute(id).name;
50
50
  }
51
51
 
52
+ function meshPolyhedraPolyhedronAttributeRange(id) {
53
+ const name = meshPolyhedraPolyhedronAttributeName(id);
54
+ const storedConfig = meshPolyhedraPolyhedronAttributeStoredConfig(id, name);
55
+ const { minimum, maximum } = storedConfig;
56
+ return [minimum, maximum];
57
+ }
58
+
59
+ function meshPolyhedraPolyhedronAttributeColorMap(id) {
60
+ const name = meshPolyhedraPolyhedronAttributeName(id);
61
+ const storedConfig = meshPolyhedraPolyhedronAttributeStoredConfig(id, name);
62
+ const { colorMap } = storedConfig;
63
+ return colorMap;
64
+ }
65
+
52
66
  return {
53
67
  meshPolyhedraPolyhedronAttribute,
54
68
  meshPolyhedraPolyhedronAttributeStoredConfig,
55
69
  setMeshPolyhedraPolyhedronAttributeStoredConfig,
56
70
  mutateMeshPolyhedraPolyhedronStyle,
57
71
  meshPolyhedraPolyhedronAttributeName,
72
+ meshPolyhedraPolyhedronAttributeRange,
73
+ meshPolyhedraPolyhedronAttributeColorMap,
58
74
  };
59
75
  }
60
76
 
@@ -133,23 +149,7 @@ export function useMeshPolyhedraPolyhedronAttributeStyle() {
133
149
  const config = useMeshPolyhedraPolyhedronAttributeConfig();
134
150
  const actions = useMeshPolyhedraPolyhedronAttributeActions();
135
151
 
136
- function meshPolyhedraPolyhedronAttributeRange(id) {
137
- const name = config.meshPolyhedraPolyhedronAttributeName(id);
138
- const storedConfig = config.meshPolyhedraPolyhedronAttributeStoredConfig(id, name);
139
- const { minimum, maximum } = storedConfig;
140
- return [minimum, maximum];
141
- }
142
-
143
- function meshPolyhedraPolyhedronAttributeColorMap(id) {
144
- const name = config.meshPolyhedraPolyhedronAttributeName(id);
145
- const storedConfig = config.meshPolyhedraPolyhedronAttributeStoredConfig(id, name);
146
- const { colorMap } = storedConfig;
147
- return colorMap;
148
- }
149
-
150
152
  return {
151
- meshPolyhedraPolyhedronAttributeRange,
152
- meshPolyhedraPolyhedronAttributeColorMap,
153
153
  ...config,
154
154
  ...actions,
155
155
  };
@@ -49,12 +49,28 @@ function useMeshPolyhedraVertexAttributeConfig() {
49
49
  return meshPolyhedraVertexAttribute(id).name;
50
50
  }
51
51
 
52
+ function meshPolyhedraVertexAttributeRange(id) {
53
+ const name = meshPolyhedraVertexAttributeName(id);
54
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
55
+ const { minimum, maximum } = storedConfig;
56
+ return [minimum, maximum];
57
+ }
58
+
59
+ function meshPolyhedraVertexAttributeColorMap(id) {
60
+ const name = meshPolyhedraVertexAttributeName(id);
61
+ const storedConfig = meshPolyhedraVertexAttributeStoredConfig(id, name);
62
+ const { colorMap } = storedConfig;
63
+ return colorMap;
64
+ }
65
+
52
66
  return {
53
67
  meshPolyhedraVertexAttribute,
54
68
  meshPolyhedraVertexAttributeStoredConfig,
55
69
  setMeshPolyhedraVertexAttributeStoredConfig,
56
70
  mutateMeshPolyhedraVertexStyle,
57
71
  meshPolyhedraVertexAttributeName,
72
+ meshPolyhedraVertexAttributeRange,
73
+ meshPolyhedraVertexAttributeColorMap,
58
74
  };
59
75
  }
60
76
 
@@ -133,23 +149,7 @@ export function useMeshPolyhedraVertexAttributeStyle() {
133
149
  const config = useMeshPolyhedraVertexAttributeConfig();
134
150
  const actions = useMeshPolyhedraVertexAttributeActions();
135
151
 
136
- function meshPolyhedraVertexAttributeRange(id) {
137
- const name = config.meshPolyhedraVertexAttributeName(id);
138
- const storedConfig = config.meshPolyhedraVertexAttributeStoredConfig(id, name);
139
- const { minimum, maximum } = storedConfig;
140
- return [minimum, maximum];
141
- }
142
-
143
- function meshPolyhedraVertexAttributeColorMap(id) {
144
- const name = config.meshPolyhedraVertexAttributeName(id);
145
- const storedConfig = config.meshPolyhedraVertexAttributeStoredConfig(id, name);
146
- const { colorMap } = storedConfig;
147
- return colorMap;
148
- }
149
-
150
152
  return {
151
- meshPolyhedraVertexAttributeRange,
152
- meshPolyhedraVertexAttributeColorMap,
153
153
  ...config,
154
154
  ...actions,
155
155
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.14.2-rc.2",
3
+ "version": "10.14.2-rc.3",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {