From 4da05b900241200576ab62a0d9e6220b6a1a98b4 Mon Sep 17 00:00:00 2001 From: SpliiT Date: Wed, 29 Apr 2026 17:34:08 +0200 Subject: [PATCH 1/9] feat(SaveCamera): Save State of the camera --- app/components/CameraManager.vue | 209 +++++++++++++++++++ app/components/VeaseViewToolbar.vue | 27 ++- app/components/ViewToolbar.vue | 19 +- app/stores/camera_manager.js | 62 ++++++ app/stores/hybrid_viewer.js | 9 + internal/database/base_database.js | 2 + internal/database/database.js | 2 +- internal/database/tables/camera_positions.js | 4 + 8 files changed, 330 insertions(+), 4 deletions(-) create mode 100644 app/components/CameraManager.vue create mode 100644 app/stores/camera_manager.js create mode 100644 internal/database/tables/camera_positions.js diff --git a/app/components/CameraManager.vue b/app/components/CameraManager.vue new file mode 100644 index 00000000..f1b643d3 --- /dev/null +++ b/app/components/CameraManager.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/app/components/VeaseViewToolbar.vue b/app/components/VeaseViewToolbar.vue index 195094e2..d2340270 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 CameraManager from "@ogw_front/components/CameraManager"; import Screenshot from "@ogw_front/components/Screenshot"; import ZScaling from "@ogw_front/components/ZScaling"; @@ -11,6 +12,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer"; const hybridViewerStore = useHybridViewerStore(); const viewerStore = useViewerStore(); const take_screenshot = ref(false); +const show_camera_manager = ref(false); const showZScaling = ref(false); const grid_scale = ref(false); const zScale = ref(hybridViewerStore.zScale); @@ -35,6 +37,13 @@ const camera_options = [ hybridViewerStore.resetCamera(); }, }, + { + tooltip: "Manage camera positions", + icon: "mdi-camera-retake", + action: () => { + show_camera_manager.value = !show_camera_manager.value; + }, + }, { tooltip: "Take a screenshot", icon: "mdi-camera", @@ -70,18 +79,32 @@ const camera_options = [