@geode/opengeodeweb-front 9.12.2 → 9.13.0-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/components/Launcher.vue +1 -2
- package/components/Recaptcha.vue +78 -24
- package/components/Viewer/Generic/Mesh/EdgesOptions.vue +14 -4
- package/components/Viewer/Generic/Mesh/PointsOptions.vue +21 -8
- package/components/Viewer/Generic/Mesh/PolygonsOptions.vue +19 -7
- package/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +21 -9
- package/components/Viewer/Generic/Model/EdgesOptions.vue +5 -2
- package/components/Viewer/Generic/Model/PointsOptions.vue +9 -3
- package/components/Viewer/PointSet/SpecificPointsOptions.vue +21 -8
- package/components/Viewer/TreeComponent.vue +18 -9
- package/components/Viewer/TreeObject.vue +2 -0
- package/package.json +3 -4
- package/stores/hybrid_viewer.js +11 -2
- package/tests/integration/microservices/viewer/requirements.txt +1 -1
- package/tests/unit/utils/recaptcha.nuxt.test.js +40 -0
- package/utils/file_import_workflow.js +1 -0
- package/utils/recaptcha.js +14 -0
package/components/Launcher.vue
CHANGED
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
align-self="center"
|
|
9
9
|
style="z-index: 1000"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
<Recaptcha :site_key="site_key" />
|
|
11
|
+
<Recaptcha :color="'secondary'" />
|
|
13
12
|
</v-col>
|
|
14
13
|
<v-col v-else-if="infra_store.status == Status.CREATING">
|
|
15
14
|
<Loading />
|
package/components/Recaptcha.vue
CHANGED
|
@@ -1,23 +1,74 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<VRow align="center" justify="center" style="display: none">
|
|
3
|
+
<VCol cols="4">
|
|
4
|
+
<VForm v-model="valid">
|
|
5
|
+
<VContainer>
|
|
6
|
+
<VRow>
|
|
7
|
+
<VCol>
|
|
8
|
+
<VTextField v-model="name" label="Name" required />
|
|
9
|
+
</VCol>
|
|
10
|
+
</VRow>
|
|
11
|
+
<VRow>
|
|
12
|
+
<VCol>
|
|
13
|
+
<VTextField
|
|
14
|
+
v-model="email"
|
|
15
|
+
:rules="emailRules"
|
|
16
|
+
label="E-mail"
|
|
17
|
+
required
|
|
18
|
+
/>
|
|
19
|
+
</VCol>
|
|
20
|
+
</VRow>
|
|
21
|
+
<VRow>
|
|
22
|
+
<VCol>
|
|
23
|
+
<VCheckbox label="Launch the app" v-model="launch" />
|
|
24
|
+
</VCol>
|
|
25
|
+
</VRow>
|
|
26
|
+
</VContainer>
|
|
27
|
+
</VForm>
|
|
28
|
+
</VCol>
|
|
29
|
+
</VRow>
|
|
30
|
+
<VRow align="center" justify="center">
|
|
31
|
+
<VCol cols="4" class="d-flex justify-center align-center">
|
|
32
|
+
<VBtn
|
|
33
|
+
:text="props.button_label"
|
|
34
|
+
:color="props.button_color"
|
|
35
|
+
@click="submit_recaptcha"
|
|
36
|
+
/>
|
|
37
|
+
</VCol>
|
|
38
|
+
</VRow>
|
|
12
39
|
</template>
|
|
13
40
|
|
|
14
41
|
<script setup>
|
|
15
|
-
import { VueRecaptcha } from "vue-recaptcha"
|
|
16
|
-
const infra_store = useInfraStore()
|
|
17
|
-
|
|
18
42
|
const props = defineProps({
|
|
19
|
-
|
|
43
|
+
button_label: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
default: "Launch the app",
|
|
47
|
+
},
|
|
48
|
+
button_color: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
default: "white",
|
|
52
|
+
},
|
|
20
53
|
})
|
|
54
|
+
const infra_store = useInfraStore()
|
|
55
|
+
const name = ref("")
|
|
56
|
+
const email = ref("")
|
|
57
|
+
const launch = ref(false)
|
|
58
|
+
const emailRules = [
|
|
59
|
+
(value) => {
|
|
60
|
+
if (value) {
|
|
61
|
+
return true
|
|
62
|
+
}
|
|
63
|
+
return "E-mail is required."
|
|
64
|
+
},
|
|
65
|
+
(value) => {
|
|
66
|
+
if (/.+@.+\..+/.test(value)) {
|
|
67
|
+
return true
|
|
68
|
+
}
|
|
69
|
+
return "E-mail must be valid."
|
|
70
|
+
},
|
|
71
|
+
]
|
|
21
72
|
|
|
22
73
|
onMounted(() => {
|
|
23
74
|
if (import.meta.client) {
|
|
@@ -29,15 +80,18 @@
|
|
|
29
80
|
}
|
|
30
81
|
}
|
|
31
82
|
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
83
|
+
function submit_recaptcha() {
|
|
84
|
+
$fetch(
|
|
85
|
+
`/.netlify/functions/recaptcha?name=${name.value}&email=${email.value}&launch=${launch.value}`,
|
|
86
|
+
{
|
|
87
|
+
onResponse({ response }) {
|
|
88
|
+
if (response.ok) {
|
|
89
|
+
infra_store.$patch({
|
|
90
|
+
is_captcha_validated: response.status === 200,
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
)
|
|
42
96
|
}
|
|
43
97
|
</script>
|
|
@@ -26,24 +26,34 @@
|
|
|
26
26
|
const id = toRef(() => props.itemProps.id)
|
|
27
27
|
|
|
28
28
|
const dataStyleStore = useDataStyleStore()
|
|
29
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
29
30
|
|
|
30
31
|
const visibility = computed({
|
|
31
32
|
get: () => dataStyleStore.meshEdgesVisibility(id.value),
|
|
32
|
-
set: (newValue) =>
|
|
33
|
-
dataStyleStore.setMeshEdgesVisibility(id.value, newValue)
|
|
33
|
+
set: (newValue) => {
|
|
34
|
+
dataStyleStore.setMeshEdgesVisibility(id.value, newValue)
|
|
35
|
+
hybridViewerStore.remoteRender()
|
|
36
|
+
},
|
|
34
37
|
})
|
|
35
38
|
const size = computed({
|
|
36
39
|
get: () => dataStyleStore.edgesSize(id.value),
|
|
37
|
-
set: (newValue) =>
|
|
40
|
+
set: (newValue) => {
|
|
41
|
+
dataStyleStore.setEdgesSize(id.value, newValue)
|
|
42
|
+
hybridViewerStore.remoteRender()
|
|
43
|
+
},
|
|
38
44
|
})
|
|
39
45
|
const coloring_style_key = computed({
|
|
40
46
|
get: () => dataStyleStore.meshEdgesActiveColoring(id.value),
|
|
41
47
|
set: (newValue) => {
|
|
42
48
|
dataStyleStore.setMeshEdgesActiveColoring(id.value, newValue)
|
|
49
|
+
hybridViewerStore.remoteRender()
|
|
43
50
|
},
|
|
44
51
|
})
|
|
45
52
|
const color = computed({
|
|
46
53
|
get: () => dataStyleStore.meshEdgesColor(id.value),
|
|
47
|
-
set: (newValue) =>
|
|
54
|
+
set: (newValue) => {
|
|
55
|
+
dataStyleStore.setMeshEdgesColor(id.value, newValue)
|
|
56
|
+
hybridViewerStore.remoteRender()
|
|
57
|
+
},
|
|
48
58
|
})
|
|
49
59
|
</script>
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
42
42
|
const dataStyleStore = useDataStyleStore()
|
|
43
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
43
44
|
|
|
44
45
|
const props = defineProps({
|
|
45
46
|
itemProps: { type: Object, required: true },
|
|
@@ -50,25 +51,37 @@
|
|
|
50
51
|
|
|
51
52
|
const visibility = computed({
|
|
52
53
|
get: () => dataStyleStore.meshPointsVisibility(id.value),
|
|
53
|
-
set: (newValue) =>
|
|
54
|
-
dataStyleStore.setMeshPointsVisibility(id.value, newValue)
|
|
54
|
+
set: (newValue) => {
|
|
55
|
+
dataStyleStore.setMeshPointsVisibility(id.value, newValue)
|
|
56
|
+
hybridViewerStore.remoteRender()
|
|
57
|
+
},
|
|
55
58
|
})
|
|
56
59
|
const size = computed({
|
|
57
60
|
get: () => dataStyleStore.meshPointsSize(id.value),
|
|
58
|
-
set: (newValue) =>
|
|
61
|
+
set: (newValue) => {
|
|
62
|
+
dataStyleStore.setMeshPointsSize(id.value, newValue)
|
|
63
|
+
hybridViewerStore.remoteRender()
|
|
64
|
+
},
|
|
59
65
|
})
|
|
60
66
|
const coloring_style_key = computed({
|
|
61
67
|
get: () => dataStyleStore.meshPointsActiveColoring(id.value),
|
|
62
|
-
set: (newValue) =>
|
|
63
|
-
dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
|
|
68
|
+
set: (newValue) => {
|
|
69
|
+
dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
|
|
70
|
+
hybridViewerStore.remoteRender()
|
|
71
|
+
},
|
|
64
72
|
})
|
|
65
73
|
const color = computed({
|
|
66
74
|
get: () => dataStyleStore.meshPointsColor(id.value),
|
|
67
|
-
set: (newValue) =>
|
|
75
|
+
set: (newValue) => {
|
|
76
|
+
dataStyleStore.setMeshPointsColor(id.value, newValue)
|
|
77
|
+
hybridViewerStore.remoteRender()
|
|
78
|
+
},
|
|
68
79
|
})
|
|
69
80
|
const vertex_attribute = computed({
|
|
70
81
|
get: () => dataStyleStore.meshPointsVertexAttribute(id.value),
|
|
71
|
-
set: (newValue) =>
|
|
72
|
-
dataStyleStore.setMeshPointsVertexAttribute(id.value, newValue)
|
|
82
|
+
set: (newValue) => {
|
|
83
|
+
dataStyleStore.setMeshPointsVertexAttribute(id.value, newValue)
|
|
84
|
+
hybridViewerStore.remoteRender()
|
|
85
|
+
},
|
|
73
86
|
})
|
|
74
87
|
</script>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<script setup>
|
|
24
24
|
const dataStyleStore = useDataStyleStore()
|
|
25
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
25
26
|
|
|
26
27
|
const props = defineProps({
|
|
27
28
|
itemProps: { type: Object, required: true },
|
|
@@ -33,33 +34,44 @@
|
|
|
33
34
|
|
|
34
35
|
const visibility = computed({
|
|
35
36
|
get: () => dataStyleStore.meshPolygonsVisibility(id.value),
|
|
36
|
-
set: (newValue) =>
|
|
37
|
-
dataStyleStore.setMeshPolygonsVisibility(id.value, newValue)
|
|
37
|
+
set: (newValue) => {
|
|
38
|
+
dataStyleStore.setMeshPolygonsVisibility(id.value, newValue)
|
|
39
|
+
hybridViewerStore.remoteRender()
|
|
40
|
+
},
|
|
38
41
|
})
|
|
39
42
|
const coloring_style_key = computed({
|
|
40
43
|
get: () => dataStyleStore.meshPolygonsActiveColoring(id.value),
|
|
41
|
-
set: (newValue) =>
|
|
42
|
-
dataStyleStore.setMeshPolygonsActiveColoring(id.value, newValue)
|
|
44
|
+
set: (newValue) => {
|
|
45
|
+
dataStyleStore.setMeshPolygonsActiveColoring(id.value, newValue)
|
|
46
|
+
hybridViewerStore.remoteRender()
|
|
47
|
+
},
|
|
43
48
|
})
|
|
44
49
|
const color = computed({
|
|
45
50
|
get: () => dataStyleStore.meshPolygonsColor(id.value),
|
|
46
|
-
set: (newValue) =>
|
|
51
|
+
set: (newValue) => {
|
|
52
|
+
dataStyleStore.setMeshPolygonsColor(id.value, newValue)
|
|
53
|
+
hybridViewerStore.remoteRender()
|
|
54
|
+
},
|
|
47
55
|
})
|
|
48
56
|
const textures = computed({
|
|
49
57
|
get: () => dataStyleStore.meshPolygonsTextures(id.value),
|
|
50
|
-
set: (newValue) =>
|
|
51
|
-
dataStyleStore.setMeshPolygonsTextures(id.value, newValue)
|
|
58
|
+
set: (newValue) => {
|
|
59
|
+
dataStyleStore.setMeshPolygonsTextures(id.value, newValue)
|
|
60
|
+
hybridViewerStore.remoteRender()
|
|
61
|
+
},
|
|
52
62
|
})
|
|
53
63
|
const vertex_attribute = computed({
|
|
54
64
|
get: () => dataStyleStore.meshPolygonsVertexAttribute(id.value),
|
|
55
65
|
set: (newValue) => {
|
|
56
66
|
dataStyleStore.setMeshPolygonsVertexAttribute(id.value, newValue)
|
|
67
|
+
hybridViewerStore.remoteRender()
|
|
57
68
|
},
|
|
58
69
|
})
|
|
59
70
|
const polygon_attribute = computed({
|
|
60
71
|
get: () => dataStyleStore.meshPolygonsPolygonAttribute(id.value),
|
|
61
72
|
set: (newValue) => {
|
|
62
73
|
dataStyleStore.setMeshPolygonsPolygonAttribute(id.value, newValue)
|
|
74
|
+
hybridViewerStore.remoteRender()
|
|
63
75
|
},
|
|
64
76
|
})
|
|
65
77
|
</script>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<script setup>
|
|
24
24
|
const dataStyleStore = useDataStyleStore()
|
|
25
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
25
26
|
|
|
26
27
|
const props = defineProps({
|
|
27
28
|
itemProps: { type: Object, required: true },
|
|
@@ -33,26 +34,37 @@
|
|
|
33
34
|
|
|
34
35
|
const visibility = computed({
|
|
35
36
|
get: () => dataStyleStore.meshPolyhedraVisibility(id.value),
|
|
36
|
-
set: (newValue) =>
|
|
37
|
-
dataStyleStore.setMeshPolyhedraVisibility(id.value, newValue)
|
|
37
|
+
set: (newValue) => {
|
|
38
|
+
dataStyleStore.setMeshPolyhedraVisibility(id.value, newValue)
|
|
39
|
+
hybridViewerStore.remoteRender()
|
|
40
|
+
},
|
|
38
41
|
})
|
|
39
42
|
const coloring_style_key = computed({
|
|
40
43
|
get: () => dataStyleStore.meshPolyhedraActiveColoring(id.value),
|
|
41
|
-
set: (newValue) =>
|
|
42
|
-
dataStyleStore.setMeshPolyhedraActiveColoring(id.value, newValue)
|
|
44
|
+
set: (newValue) => {
|
|
45
|
+
dataStyleStore.setMeshPolyhedraActiveColoring(id.value, newValue)
|
|
46
|
+
hybridViewerStore.remoteRender()
|
|
47
|
+
},
|
|
43
48
|
})
|
|
44
49
|
const color = computed({
|
|
45
50
|
get: () => dataStyleStore.meshPolyhedraColor(id.value),
|
|
46
|
-
set: (newValue) =>
|
|
51
|
+
set: (newValue) => {
|
|
52
|
+
dataStyleStore.setMeshPolyhedraColor(id.value, newValue)
|
|
53
|
+
hybridViewerStore.remoteRender()
|
|
54
|
+
},
|
|
47
55
|
})
|
|
48
56
|
const vertex_attribute = computed({
|
|
49
57
|
get: () => dataStyleStore.polyhedraVertexAttribute(id.value),
|
|
50
|
-
set: (newValue) =>
|
|
51
|
-
dataStyleStore.setPolyhedraVertexAttribute(id.value, newValue)
|
|
58
|
+
set: (newValue) => {
|
|
59
|
+
dataStyleStore.setPolyhedraVertexAttribute(id.value, newValue)
|
|
60
|
+
hybridViewerStore.remoteRender()
|
|
61
|
+
},
|
|
52
62
|
})
|
|
53
63
|
const polyhedron_attribute = computed({
|
|
54
64
|
get: () => dataStyleStore.polyhedraPolyhedronAttribute(id.value),
|
|
55
|
-
set: (newValue) =>
|
|
56
|
-
dataStyleStore.setPolyhedraPolyhedronAttribute(id.value, newValue)
|
|
65
|
+
set: (newValue) => {
|
|
66
|
+
dataStyleStore.setPolyhedraPolyhedronAttribute(id.value, newValue)
|
|
67
|
+
hybridViewerStore.remoteRender()
|
|
68
|
+
},
|
|
57
69
|
})
|
|
58
70
|
</script>
|
|
@@ -20,10 +20,13 @@
|
|
|
20
20
|
|
|
21
21
|
const id = toRef(() => props.itemProps.id)
|
|
22
22
|
const dataStyleStore = useDataStyleStore()
|
|
23
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
23
24
|
|
|
24
25
|
const visibility = computed({
|
|
25
26
|
get: () => dataStyleStore.modelEdgesVisibility(id.value),
|
|
26
|
-
set: (newValue) =>
|
|
27
|
-
dataStyleStore.setModelEdgesVisibility(id.value, newValue)
|
|
27
|
+
set: (newValue) => {
|
|
28
|
+
dataStyleStore.setModelEdgesVisibility(id.value, newValue)
|
|
29
|
+
hybridViewerStore.remoteRender()
|
|
30
|
+
},
|
|
28
31
|
})
|
|
29
32
|
</script>
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
import SurfacePoints from "@ogw_f/assets/viewer_svgs/surface_points.svg"
|
|
34
34
|
|
|
35
35
|
const dataStyleStore = useDataStyleStore()
|
|
36
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
36
37
|
|
|
37
38
|
const props = defineProps({
|
|
38
39
|
itemProps: { type: Object, required: true },
|
|
@@ -43,11 +44,16 @@
|
|
|
43
44
|
|
|
44
45
|
const visibility = computed({
|
|
45
46
|
get: () => dataStyleStore.modelPointsVisibility(id.value),
|
|
46
|
-
set: (newValue) =>
|
|
47
|
-
dataStyleStore.setModelPointsVisibility(id.value, newValue)
|
|
47
|
+
set: (newValue) => {
|
|
48
|
+
dataStyleStore.setModelPointsVisibility(id.value, newValue)
|
|
49
|
+
hybridViewerStore.remoteRender()
|
|
50
|
+
},
|
|
48
51
|
})
|
|
49
52
|
const size = computed({
|
|
50
53
|
get: () => dataStyleStore.modelPointsSize(id.value),
|
|
51
|
-
set: (newValue) =>
|
|
54
|
+
set: (newValue) => {
|
|
55
|
+
dataStyleStore.setModelPointsSize(id.value, newValue)
|
|
56
|
+
hybridViewerStore.remoteRender()
|
|
57
|
+
},
|
|
52
58
|
})
|
|
53
59
|
</script>
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
43
|
const dataStyleStore = useDataStyleStore()
|
|
44
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
44
45
|
|
|
45
46
|
const props = defineProps({
|
|
46
47
|
itemProps: { type: Object, required: true },
|
|
@@ -51,25 +52,37 @@
|
|
|
51
52
|
|
|
52
53
|
const visibility = computed({
|
|
53
54
|
get: () => dataStyleStore.meshPointsVisibility(id.value),
|
|
54
|
-
set: (newValue) =>
|
|
55
|
-
dataStyleStore.setMeshPointsVisibility(id.value, newValue)
|
|
55
|
+
set: (newValue) => {
|
|
56
|
+
dataStyleStore.setMeshPointsVisibility(id.value, newValue)
|
|
57
|
+
hybridViewerStore.remoteRender()
|
|
58
|
+
},
|
|
56
59
|
})
|
|
57
60
|
const size = computed({
|
|
58
61
|
get: () => dataStyleStore.meshPointsSize(id.value),
|
|
59
|
-
set: (newValue) =>
|
|
62
|
+
set: (newValue) => {
|
|
63
|
+
dataStyleStore.setMeshPointsSize(id.value, newValue)
|
|
64
|
+
hybridViewerStore.remoteRender()
|
|
65
|
+
},
|
|
60
66
|
})
|
|
61
67
|
const coloring_style_key = computed({
|
|
62
68
|
get: () => dataStyleStore.meshPointsActiveColoring(id.value),
|
|
63
|
-
set: (newValue) =>
|
|
64
|
-
dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
|
|
69
|
+
set: (newValue) => {
|
|
70
|
+
dataStyleStore.setMeshPointsActiveColoring(id.value, newValue)
|
|
71
|
+
hybridViewerStore.remoteRender()
|
|
72
|
+
},
|
|
65
73
|
})
|
|
66
74
|
const color = computed({
|
|
67
75
|
get: () => dataStyleStore.meshPointsColor(id.value),
|
|
68
|
-
set: (newValue) =>
|
|
76
|
+
set: (newValue) => {
|
|
77
|
+
dataStyleStore.setMeshPointsColor(id.value, newValue)
|
|
78
|
+
hybridViewerStore.remoteRender()
|
|
79
|
+
},
|
|
69
80
|
})
|
|
70
81
|
const vertex_attribute = computed({
|
|
71
82
|
get: () => dataStyleStore.meshPointsVertexAttribute(id.value),
|
|
72
|
-
set: (newValue) =>
|
|
73
|
-
dataStyleStore.setMeshPointsVertexAttribute(id.value, newValue)
|
|
83
|
+
set: (newValue) => {
|
|
84
|
+
dataStyleStore.setMeshPointsVertexAttribute(id.value, newValue)
|
|
85
|
+
hybridViewerStore.remoteRender()
|
|
86
|
+
},
|
|
74
87
|
})
|
|
75
88
|
</script>
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
<script setup>
|
|
17
17
|
const dataStyleStore = useDataStyleStore()
|
|
18
18
|
const dataBaseStore = useDataBaseStore()
|
|
19
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
19
20
|
|
|
20
21
|
const props = defineProps({ id: { type: String, required: true } })
|
|
21
22
|
|
|
@@ -39,43 +40,51 @@
|
|
|
39
40
|
removed_surfaces,
|
|
40
41
|
removed_blocks,
|
|
41
42
|
] = sortMeshComponents(removed)
|
|
42
|
-
if (added_corners.length > 0)
|
|
43
|
+
if (added_corners.length > 0) {
|
|
43
44
|
dataStyleStore.setModelCornersVisibility(
|
|
44
45
|
props.id,
|
|
45
46
|
added_corners,
|
|
46
47
|
true,
|
|
47
48
|
)
|
|
48
|
-
|
|
49
|
+
}
|
|
50
|
+
if (added_lines.length > 0) {
|
|
49
51
|
dataStyleStore.setModelLinesVisibility(props.id, added_lines, true)
|
|
50
|
-
|
|
52
|
+
}
|
|
53
|
+
if (added_surfaces.length > 0) {
|
|
51
54
|
dataStyleStore.setModelSurfacesVisibility(
|
|
52
55
|
props.id,
|
|
53
56
|
added_surfaces,
|
|
54
57
|
true,
|
|
55
58
|
)
|
|
56
|
-
|
|
59
|
+
}
|
|
60
|
+
if (added_blocks.length > 0) {
|
|
57
61
|
dataStyleStore.setModelBlocksVisibility(props.id, added_blocks, true)
|
|
58
|
-
|
|
59
|
-
if (removed_corners.length > 0)
|
|
62
|
+
}
|
|
63
|
+
if (removed_corners.length > 0) {
|
|
60
64
|
dataStyleStore.setModelCornersVisibility(
|
|
61
65
|
props.id,
|
|
62
66
|
removed_corners,
|
|
63
67
|
false,
|
|
64
68
|
)
|
|
65
|
-
|
|
69
|
+
}
|
|
70
|
+
if (removed_lines.length > 0) {
|
|
66
71
|
dataStyleStore.setModelLinesVisibility(props.id, removed_lines, false)
|
|
67
|
-
|
|
72
|
+
}
|
|
73
|
+
if (removed_surfaces.length > 0) {
|
|
68
74
|
dataStyleStore.setModelSurfacesVisibility(
|
|
69
75
|
props.id,
|
|
70
76
|
removed_surfaces,
|
|
71
77
|
false,
|
|
72
78
|
)
|
|
73
|
-
|
|
79
|
+
}
|
|
80
|
+
if (removed_blocks.length > 0) {
|
|
74
81
|
dataStyleStore.setModelBlocksVisibility(
|
|
75
82
|
props.id,
|
|
76
83
|
removed_blocks,
|
|
77
84
|
false,
|
|
78
85
|
)
|
|
86
|
+
}
|
|
87
|
+
hybridViewerStore.remoteRender()
|
|
79
88
|
}
|
|
80
89
|
},
|
|
81
90
|
{ immediate: true, deep: true },
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
const treeviewStore = useTreeviewStore()
|
|
40
40
|
const dataStyleStore = useDataStyleStore()
|
|
41
41
|
const dataBaseStore = useDataBaseStore()
|
|
42
|
+
const hybridViewerStore = useHybridViewerStore()
|
|
42
43
|
const emit = defineEmits(["show-menu"])
|
|
43
44
|
|
|
44
45
|
function isLeafNode(item) {
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
})
|
|
72
|
+
hybridViewerStore.remoteRender()
|
|
71
73
|
},
|
|
72
74
|
{ immediate: true },
|
|
73
75
|
)
|
package/package.json
CHANGED
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "9.
|
|
43
|
+
"version": "9.13.0-rc.1",
|
|
44
44
|
"main": "./nuxt.config.js",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@geode/opengeodeweb-back": "
|
|
47
|
-
"@geode/opengeodeweb-viewer": "
|
|
46
|
+
"@geode/opengeodeweb-back": "next",
|
|
47
|
+
"@geode/opengeodeweb-viewer": "next",
|
|
48
48
|
"@kitware/vtk.js": "33.3.0",
|
|
49
49
|
"@mdi/font": "7.4.47",
|
|
50
50
|
"@pinia/nuxt": "0.5.4",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"sass": "1.87.0",
|
|
61
61
|
"semver": "7.7.1",
|
|
62
62
|
"uuid": "11.1.0",
|
|
63
|
-
"vue-recaptcha": "2.0.3",
|
|
64
63
|
"vue3-carousel": "0.3.4",
|
|
65
64
|
"vuetify": "3.8.12",
|
|
66
65
|
"ws": "8.18.3",
|
package/stores/hybrid_viewer.js
CHANGED
|
@@ -100,6 +100,7 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
function syncRemoteCamera() {
|
|
103
|
+
console.log("syncRemoteCamera")
|
|
103
104
|
const renderer = genericRenderWindow.value.getRenderer()
|
|
104
105
|
const camera = renderer.getActiveCamera()
|
|
105
106
|
const params = {
|
|
@@ -118,7 +119,8 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
118
119
|
params,
|
|
119
120
|
},
|
|
120
121
|
{
|
|
121
|
-
|
|
122
|
+
response_function: () => {
|
|
123
|
+
remoteRender()
|
|
122
124
|
for (const key in params.camera_options) {
|
|
123
125
|
camera_options[key] = params.camera_options[key]
|
|
124
126
|
}
|
|
@@ -129,7 +131,7 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
129
131
|
|
|
130
132
|
function remoteRender() {
|
|
131
133
|
viewer_call({
|
|
132
|
-
schema: viewer_schemas.opengeodeweb_viewer.viewer.
|
|
134
|
+
schema: viewer_schemas.opengeodeweb_viewer.viewer.render,
|
|
133
135
|
})
|
|
134
136
|
}
|
|
135
137
|
|
|
@@ -142,10 +144,12 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
142
144
|
imageStyle.transition = "opacity 0.1s ease-in"
|
|
143
145
|
imageStyle.zIndex = 1
|
|
144
146
|
resize(container.value.$el.offsetWidth, container.value.$el.offsetHeight)
|
|
147
|
+
console.log("setContainer", container.value.$el)
|
|
145
148
|
|
|
146
149
|
useMousePressed({
|
|
147
150
|
target: container,
|
|
148
151
|
onPressed: (event) => {
|
|
152
|
+
console.log("onPressed")
|
|
149
153
|
if (event.button == 0) {
|
|
150
154
|
is_moving.value = true
|
|
151
155
|
event.stopPropagation()
|
|
@@ -153,7 +157,11 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
153
157
|
}
|
|
154
158
|
},
|
|
155
159
|
onReleased: () => {
|
|
160
|
+
if (!is_moving.value) {
|
|
161
|
+
return
|
|
162
|
+
}
|
|
156
163
|
is_moving.value = false
|
|
164
|
+
console.log("onReleased")
|
|
157
165
|
syncRemoteCamera()
|
|
158
166
|
},
|
|
159
167
|
})
|
|
@@ -198,6 +206,7 @@ export const useHybridViewerStore = defineStore("hybridViewer", () => {
|
|
|
198
206
|
setZScaling,
|
|
199
207
|
syncRemoteCamera,
|
|
200
208
|
initHybridViewer,
|
|
209
|
+
remoteRender,
|
|
201
210
|
resize,
|
|
202
211
|
setContainer,
|
|
203
212
|
zScale,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Third party imports
|
|
2
|
+
import { describe, expect, test } from "vitest"
|
|
3
|
+
|
|
4
|
+
// Local imports
|
|
5
|
+
import { check_recaptcha_params } from "~/utils/recaptcha.js"
|
|
6
|
+
|
|
7
|
+
describe("recaptcha.js", () => {
|
|
8
|
+
const name = ""
|
|
9
|
+
const email = ""
|
|
10
|
+
const launch = false
|
|
11
|
+
const internal_error = 500
|
|
12
|
+
const success = 200
|
|
13
|
+
|
|
14
|
+
describe("wrong params", () => {
|
|
15
|
+
test("name", () => {
|
|
16
|
+
const name = "test"
|
|
17
|
+
const result = check_recaptcha_params(name, email, launch)
|
|
18
|
+
expect(result.status).toBe(internal_error)
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
test("email", () => {
|
|
22
|
+
const email = "test"
|
|
23
|
+
const result = check_recaptcha_params(name, email, launch)
|
|
24
|
+
expect(result.status).toBe(internal_error)
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
test("launch", () => {
|
|
28
|
+
const launch = true
|
|
29
|
+
const result = check_recaptcha_params(name, email, launch)
|
|
30
|
+
expect(result.status).toBe(internal_error)
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
describe("right params", () => {
|
|
35
|
+
test("name", () => {
|
|
36
|
+
const result = check_recaptcha_params(name, email, launch)
|
|
37
|
+
expect(result.status).toBe(success)
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function check_recaptcha_params(name, email, launch) {
|
|
2
|
+
if (name !== "") {
|
|
3
|
+
return { status: 500 }
|
|
4
|
+
}
|
|
5
|
+
if (email !== "") {
|
|
6
|
+
return { status: 500 }
|
|
7
|
+
}
|
|
8
|
+
if (launch !== false) {
|
|
9
|
+
return { status: 500 }
|
|
10
|
+
}
|
|
11
|
+
return { status: 200 }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { check_recaptcha_params }
|