From af49d6dc93c37521bca579dbeee4f9835312eb67 Mon Sep 17 00:00:00 2001 From: MaxNumerique Date: Wed, 22 Apr 2026 16:09:32 +0200 Subject: [PATCH 1/6] v0 --- app/components/CameraOrientation.vue | 31 +++++++++++++++++++++++ app/components/VeaseViewToolbar.vue | 37 +++++++++++++++++++++++++++- app/components/ViewToolbar.vue | 22 +++++++++++++++++ app/stores/hybrid_viewer.js | 19 ++++++++++++++ 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 app/components/CameraOrientation.vue diff --git a/app/components/CameraOrientation.vue b/app/components/CameraOrientation.vue new file mode 100644 index 00000000..7374f6df --- /dev/null +++ b/app/components/CameraOrientation.vue @@ -0,0 +1,31 @@ + + + diff --git a/app/components/VeaseViewToolbar.vue b/app/components/VeaseViewToolbar.vue index 195094e2..742a7508 100644 --- a/app/components/VeaseViewToolbar.vue +++ b/app/components/VeaseViewToolbar.vue @@ -2,6 +2,7 @@ import schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json"; import ActionButton from "@ogw_front/components/ActionButton.vue"; +import CameraOrientation from "@ogw_front/components/CameraOrientation"; import Screenshot from "@ogw_front/components/Screenshot"; import ZScaling from "@ogw_front/components/ZScaling"; @@ -32,9 +33,18 @@ const camera_options = [ tooltip: "Reset camera", icon: "mdi-cube-scan", action: () => { - hybridViewerStore.resetCamera(); + viewerStore.request(schemas.opengeodeweb_viewer.viewer.reset_camera, { + response_function: (response) => { + hybridViewerStore.updateLocalCamera(response); + }, + }); }, }, + { + tooltip: "Camera orientation", + icon: "mdi-compass-outline", + menu: true, + }, { tooltip: "Take a screenshot", icon: "mdi-camera", @@ -66,13 +76,38 @@ const camera_options = [ }, }, ]; + +function setOrientation(direction) { + viewerStore.request( + schemas.opengeodeweb_viewer.viewer.set_camera_orientation, + { direction }, + { + response_function: (response) => { + hybridViewerStore.updateLocalCamera(response); + hybridViewerStore.remoteRender(); + }, + }, + ); +}