Skip to content

Commit 7d36903

Browse files
authored
Merge pull request #271 from Geode-solutions/geode-objects-redesign
Geode objects redesign
2 parents 0d95fa1 + b1720f1 commit 7d36903

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+751
-207
lines changed

app/components/CrsSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
])
3535
3636
const props = defineProps({
37-
input_geode_object: { type: String, required: true },
37+
geode_object_type: { type: String, required: true },
3838
key_to_update: { type: String, required: true },
3939
})
4040
41-
const { input_geode_object, key_to_update } = props
41+
const { geode_object_type, key_to_update } = props
4242
4343
const search = ref("")
4444
const data_table_loading = ref(false)
@@ -64,7 +64,7 @@
6464
}
6565
6666
async function get_crs_table() {
67-
const params = { input_geode_object }
67+
const params = { geode_object_type }
6868
toggle_loading()
6969
await api_fetch(
7070
{ schema, params },

app/components/ExtensionSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@
6767
])
6868
6969
const props = defineProps({
70-
input_geode_object: { type: String, required: true },
70+
geode_object_type: { type: String, required: true },
7171
filenames: { type: Array, required: true },
7272
})
73-
const { input_geode_object, filenames } = props
73+
const { geode_object_type, filenames } = props
7474
const geode_objects_and_output_extensions = ref({})
7575
const loading = ref(false)
7676
@@ -81,7 +81,7 @@
8181
geode_objects_and_output_extensions.value = {}
8282
var promise_array = []
8383
for (const filename of filenames) {
84-
const params = { input_geode_object, filename }
84+
const params = { geode_object_type, filename }
8585
const promise = new Promise((resolve, reject) => {
8686
api_fetch(
8787
{ schema, params },

app/components/FileSelector.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@
5252
5353
async function get_allowed_files() {
5454
toggle_loading()
55-
const params = { supported_feature }
5655
await api_fetch(
57-
{ schema, params },
56+
{ schema },
5857
{
5958
response_function: (response) => {
6059
accept.value = response._data.extensions

app/components/Inspector/InspectionButton.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<v-btn
44
:loading="loading"
55
color="primary"
6-
@click="get_inspection_results(props.input_geode_object, props.filename)"
6+
@click="get_inspection_results(props.geode_object_type, props.filename)"
77
>
88
Inspect
99
<template #loader>
@@ -24,15 +24,15 @@
2424
"decrement_step",
2525
])
2626
const props = defineProps({
27-
input_geode_object: { type: String, required: true },
27+
geode_object_type: { type: String, required: true },
2828
filename: { type: String, required: true },
2929
})
3030
const loading = ref(false)
3131
const toggle_loading = useToggle(loading)
3232
33-
async function get_inspection_results(input_geode_object, filename) {
33+
async function get_inspection_results(geode_object_type, filename) {
3434
toggle_loading()
35-
const params = { input_geode_object, filename }
35+
const params = { geode_object_type, filename }
3636
3737
await api_fetch(
3838
{ schema, params },

app/components/MissingFilesSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@
5858
5959
const props = defineProps({
6060
multiple: { type: Boolean, required: true },
61-
input_geode_object: { type: String, required: true },
61+
geode_object_type: { type: String, required: true },
6262
filenames: { type: Array, required: true },
6363
})
6464
65-
const { multiple, input_geode_object, filenames } = props
65+
const { multiple, geode_object_type, filenames } = props
6666
6767
const accept = ref("")
6868
const loading = ref(false)
@@ -84,7 +84,7 @@
8484
var promise_array = []
8585
8686
for (const filename of filenames) {
87-
const params = { input_geode_object, filename }
87+
const params = { geode_object_type, filename }
8888
const promise = new Promise((resolve, reject) => {
8989
api_fetch(
9090
{ schema, params },

app/components/ObjectSelector.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
toggle_loading()
110110
allowed_objects.value = {}
111111
const promise_array = filenames.map((filename) => {
112-
const params = { filename, supported_feature }
112+
const params = { filename }
113113
return api_fetch({ schema, params })
114114
})
115115
const responses = await Promise.all(promise_array)
@@ -141,9 +141,9 @@
141141
toggle_loading()
142142
}
143143
144-
function set_geode_object(input_geode_object) {
145-
if (input_geode_object) {
146-
emit("update_values", { input_geode_object })
144+
function set_geode_object(geode_object_type) {
145+
if (geode_object_type) {
146+
emit("update_values", { geode_object_type })
147147
emit("increment_step")
148148
}
149149
}
@@ -155,6 +155,7 @@
155155
filter: opacity(0.7);
156156
cursor: pointer;
157157
}
158+
158159
.disabled div {
159160
cursor: not-allowed;
160161
}

app/components/Viewer/BreadCrumb.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}}
2222
</v-icon>
2323
<span class="text-subtitle-1 font-weight-regular align-center mt-1">
24-
Model Explorer ({{ metaDatas.displayed_name }})
24+
Model Explorer ({{ metaDatas.name }})
2525
</span>
2626
</template>
2727
</v-menu>

app/components/Viewer/ContextMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104
105105
const menu_items = computed(() =>
106106
menuStore.getMenuItems(
107-
meta_data.value.object_type,
108-
meta_data.value.geode_object,
107+
meta_data.value.viewer_type,
108+
meta_data.value.geode_object_type,
109109
),
110110
)
111111
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<template>
2+
<ViewerContextMenuItem
3+
:itemProps="props.itemProps"
4+
:tooltip="props.tooltip"
5+
:btn_image="props.btn_image"
6+
>
7+
<template #options>
8+
<ViewerOptionsVisibilitySwitch v-model="visibility" />
9+
<template v-if="visibility">
10+
<ViewerOptionsColoringTypeSelector
11+
:id="id"
12+
v-model:coloring_style_key="coloring_style_key"
13+
v-model:color="color"
14+
v-model:textures="textures"
15+
v-model:vertex_attribute="vertex_attribute"
16+
v-model:cell_attribute="cell_attribute"
17+
/>
18+
</template>
19+
</template>
20+
</ViewerContextMenuItem>
21+
</template>
22+
23+
<script setup>
24+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenuItem.vue"
25+
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue"
26+
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue"
27+
28+
const dataStyleStore = useDataStyleStore()
29+
const hybridViewerStore = useHybridViewerStore()
30+
31+
const props = defineProps({
32+
itemProps: { type: Object, required: true },
33+
btn_image: { type: String, required: true },
34+
tooltip: { type: String, required: false, default: "Cells options" },
35+
})
36+
37+
const id = toRef(() => props.itemProps.id)
38+
39+
const visibility = computed({
40+
get: () => dataStyleStore.meshCellsVisibility(id.value),
41+
set: (newValue) => {
42+
dataStyleStore.setMeshCellsVisibility(id.value, newValue)
43+
hybridViewerStore.remoteRender()
44+
},
45+
})
46+
const coloring_style_key = computed({
47+
get: () => dataStyleStore.meshCellsActiveColoring(id.value),
48+
set: (newValue) => {
49+
dataStyleStore.setMeshCellsActiveColoring(id.value, newValue)
50+
hybridViewerStore.remoteRender()
51+
},
52+
})
53+
const color = computed({
54+
get: () => dataStyleStore.meshCellsColor(id.value),
55+
set: (newValue) => {
56+
dataStyleStore.setMeshCellsColor(id.value, newValue)
57+
hybridViewerStore.remoteRender()
58+
},
59+
})
60+
const textures = computed({
61+
get: () => dataStyleStore.meshCellsTextures(id.value),
62+
set: (newValue) => {
63+
dataStyleStore.setMeshCellsTextures(id.value, newValue)
64+
hybridViewerStore.remoteRender()
65+
},
66+
})
67+
const vertex_attribute = computed({
68+
get: () => dataStyleStore.meshCellsVertexAttribute(id.value),
69+
set: (newValue) => {
70+
dataStyleStore.setMeshCellsVertexAttribute(id.value, newValue)
71+
hybridViewerStore.remoteRender()
72+
},
73+
})
74+
const cell_attribute = computed({
75+
get: () => dataStyleStore.meshCellsCellAttribute(id.value),
76+
set: (newValue) => {
77+
dataStyleStore.setMeshCellsCellAttribute(id.value, newValue)
78+
hybridViewerStore.remoteRender()
79+
},
80+
})
81+
</script>

app/components/Viewer/Grid/2D/CellsOptions.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
2-
<ViewerGenericMeshPolygonsOptions
2+
<ViewerGenericMeshCellsOptions
33
:itemProps="props.itemProps"
44
:btn_image="Grid2D_Cells"
55
tooltip="Cells options"
66
/>
77
</template>
88

99
<script setup>
10-
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions.vue"
10+
import ViewerGenericMeshCellsOptions from "@ogw_front/components/Viewer/Generic/Mesh/CellsOptions.vue"
1111
import Grid2D_Cells from "@ogw_front/assets/viewer_svgs/grid_2d_cells.svg"
1212
1313
const props = defineProps({

0 commit comments

Comments
 (0)