@geode/opengeodeweb-front 9.12.2 → 9.12.3-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.
@@ -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) => dataStyleStore.setEdgesSize(id.value, 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) => dataStyleStore.setMeshEdgesColor(id.value, 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) => dataStyleStore.setMeshPointsSize(id.value, 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) => dataStyleStore.setMeshPointsColor(id.value, 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) => dataStyleStore.setMeshPolygonsColor(id.value, 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) => dataStyleStore.setMeshPolyhedraColor(id.value, 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) => dataStyleStore.setModelPointsSize(id.value, 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) => dataStyleStore.setMeshPointsSize(id.value, 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) => dataStyleStore.setMeshPointsColor(id.value, 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
- if (added_lines.length > 0)
49
+ }
50
+ if (added_lines.length > 0) {
49
51
  dataStyleStore.setModelLinesVisibility(props.id, added_lines, true)
50
- if (added_surfaces.length > 0)
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
- if (added_blocks.length > 0)
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
- if (removed_lines.length > 0)
69
+ }
70
+ if (removed_lines.length > 0) {
66
71
  dataStyleStore.setModelLinesVisibility(props.id, removed_lines, false)
67
- if (removed_surfaces.length > 0)
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
- if (removed_blocks.length > 0)
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.12.2",
43
+ "version": "9.12.3-rc.1",
44
44
  "main": "./nuxt.config.js",
45
45
  "dependencies": {
46
- "@geode/opengeodeweb-back": "latest",
47
- "@geode/opengeodeweb-viewer": "latest",
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",
@@ -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
- response_fonction: () => {
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.render_now,
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,
@@ -76,6 +76,7 @@ async function importFile(filename, geode_object) {
76
76
  }
77
77
  await dataStyleStore.applyDefaultStyle(id)
78
78
  console.log("after dataStyleStore.applyDefaultStyle")
79
+ hybridViewerStore.remoteRender()
79
80
  return data._value.id
80
81
  }
81
82