@geode/opengeodeweb-front 10.34.0-rc.8 → 10.34.0
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/{server → .build/server}/utils/app_config.js +10 -9
- package/{server → .build/server}/utils/cleanup.js +31 -17
- package/{server → .build/server}/utils/cloud.js +1 -4
- package/{server → .build/server}/utils/microservices.js +21 -9
- package/{server → .build/server}/utils/path.js +4 -4
- package/{server → .build/server}/utils/scripts.js +9 -9
- package/.build/server/utils/server_config.js +51 -0
- package/.build/server/utils/stream.js +6 -0
- package/{server → .build/server}/utils/ws_client.js +18 -3
- package/{shared → .build/shared}/scripts.js +10 -10
- package/.build/shared/utils/call_raw.js +31 -0
- package/{shared → .build/shared}/utils/call_schema.js +2 -2
- package/.build/shared/utils/fetch_raw.js +52 -0
- package/{shared → .build/shared}/utils/fetch_schema.js +2 -2
- package/{shared → .build/shared}/utils/file.js +3 -1
- package/{shared → .build/shared}/utils/response_handlers/load.js +10 -7
- package/{shared → .build/shared}/utils/validate_schema.js +1 -1
- package/app/components/ActionButton.vue +6 -6
- package/app/components/CameraManager/List.vue +5 -5
- package/app/components/CameraManager/Saver.vue +3 -5
- package/app/components/CameraManager.vue +6 -4
- package/app/components/CameraOrientation.vue +12 -12
- package/app/components/ClippingPlaneCard.vue +4 -2
- package/app/components/ClippingPlanes.vue +8 -8
- package/app/components/CrsSelector.vue +9 -10
- package/app/components/DeleteDialog.vue +4 -2
- package/app/components/DragAndDrop.vue +10 -12
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +4 -2
- package/app/components/ExtensionSelector.vue +4 -4
- package/app/components/FeedBack/ErrorBanner.vue +3 -1
- package/app/components/FeedBack/Snackers.vue +4 -3
- package/app/components/FileSelector.vue +10 -8
- package/app/components/FileUploader.vue +11 -11
- package/app/components/GlassCard.vue +1 -1
- package/app/components/HybridRenderingView.vue +7 -5
- package/app/components/HybridViewerTooltip.vue +7 -7
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading/EcoMessages.vue +9 -3
- package/app/components/Loading.vue +2 -2
- package/app/components/MissingFilesSelector.vue +12 -10
- package/app/components/ObjectSelector.vue +10 -9
- package/app/components/PackagesVersions.vue +6 -5
- package/app/components/Recaptcha.vue +3 -3
- package/app/components/RemoteRenderingView.vue +6 -7
- package/app/components/Ruler.vue +3 -3
- package/app/components/Screenshot.vue +6 -6
- package/app/components/SearchBar.vue +4 -2
- package/app/components/ShrinkFilter.vue +7 -7
- package/app/components/Step.vue +6 -5
- package/app/components/Stepper.vue +4 -3
- package/app/components/ToolPanel.vue +6 -3
- package/app/components/ViewToolbar.vue +25 -28
- package/app/components/Viewer/ContextMenu/CenterButton.vue +7 -5
- package/app/components/Viewer/ContextMenu/CircularItems.vue +3 -3
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +22 -19
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -8
- package/app/components/Viewer/ContextMenu/InfoCard.vue +11 -12
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +13 -17
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -16
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -12
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +11 -15
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +53 -23
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +1 -3
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +31 -15
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +2 -3
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +6 -6
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +69 -38
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +64 -46
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +13 -9
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +10 -10
- package/app/components/Viewer/ObjectTree/Box.vue +6 -4
- package/app/components/Viewer/ObjectTree/Layout.vue +23 -21
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +14 -14
- package/app/components/Viewer/ObjectTree/Views/{ModelCollections.vue → ModelTree.vue} +59 -24
- package/app/components/Viewer/Options/AttributeColorBar.vue +4 -2
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +4 -2
- package/app/components/Viewer/Options/AttributeSelector.vue +7 -9
- package/app/components/Viewer/Options/ColorMapList.vue +15 -13
- package/app/components/Viewer/Options/ColorMapPicker.vue +4 -4
- package/app/components/Viewer/Options/ColorPicker.vue +223 -41
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +16 -16
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +7 -5
- package/app/components/Viewer/Options/OptionsSection.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +8 -6
- package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +8 -9
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -6
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +12 -16
- package/app/components/Viewer/Surface/PolygonsOptions.vue +12 -16
- package/app/components/Viewer/Ui.vue +2 -2
- package/app/components/Wrapper.vue +1 -4
- package/app/components/ZScaling.vue +5 -3
- package/app/components/csv-preview/CsvPreviewer.vue +38 -37
- package/app/components/csv-preview/CsvSettings.vue +6 -4
- package/app/components/csv-preview/CsvTable.vue +1 -1
- package/app/composables/batch_style.ts +5 -6
- package/app/composables/clipping_planes_widget.ts +73 -181
- package/app/composables/clipping_planes_widget_entries.ts +189 -0
- package/app/composables/copy_to_clipboard.ts +7 -0
- package/app/composables/global_attribute_style.ts +163 -83
- package/app/composables/hover_highlight.ts +46 -14
- package/app/composables/model_collections.ts +26 -13
- package/app/composables/model_components.ts +26 -13
- package/app/composables/project_manager.ts +76 -19
- package/app/composables/responsive_middle_truncate.ts +13 -13
- package/app/composables/stepper_tree.ts +34 -11
- package/app/composables/tree_filter.ts +66 -44
- package/app/composables/tree_keyboard_nav.ts +25 -11
- package/app/composables/tree_scroll.ts +44 -14
- package/app/composables/use_adaptive_styles.ts +66 -23
- package/app/composables/use_overlapping_picker.ts +66 -16
- package/app/composables/use_quick_colormap.ts +16 -5
- package/app/composables/virtual_tree.ts +75 -43
- package/app/composables/vtk_implicit_plane_widget.d.ts +2 -0
- package/app/plugins/auto_store_register.ts +2 -7
- package/app/plugins/click_outside_ignore_snackbars.client.ts +39 -0
- package/app/stores/app.ts +57 -192
- package/app/stores/app_helpers/extension.ts +179 -0
- package/app/stores/back.ts +37 -21
- package/app/stores/camera_manager.ts +22 -20
- package/app/stores/cloud.ts +17 -13
- package/app/stores/data.ts +88 -47
- package/app/stores/data_helpers/collections.ts +36 -38
- package/app/stores/data_helpers/mesh.ts +45 -36
- package/app/stores/data_style.ts +50 -28
- package/app/stores/feedback.ts +6 -6
- package/app/stores/hybrid_viewer.ts +41 -52
- package/app/stores/infra.ts +39 -37
- package/app/stores/menu.ts +23 -14
- package/app/stores/treeview.ts +72 -42
- package/app/stores/viewer.ts +39 -27
- package/app/utils/attributes.ts +3 -3
- package/app/utils/clipping_planes.ts +111 -14
- package/app/utils/color_picker.ts +57 -0
- package/app/utils/colormap.ts +58 -35
- package/app/utils/default_styles/index.ts +2 -2
- package/app/utils/default_styles/meshes.ts +107 -13
- package/app/utils/default_styles/models.ts +83 -14
- package/app/utils/extension.ts +47 -20
- package/app/utils/import_workflow.ts +21 -13
- package/app/utils/name_cleaner.ts +1 -1
- package/app/utils/string.ts +1 -1
- package/app/utils/treeview.ts +2 -2
- package/internal/database/base_database.ts +7 -3
- package/internal/database/database.ts +36 -26
- package/internal/database/extended_database.ts +1 -1
- package/internal/stores/data_style/mesh/cells/cell.ts +70 -34
- package/internal/stores/data_style/mesh/cells/color.ts +12 -6
- package/internal/stores/data_style/mesh/cells/common.ts +18 -8
- package/internal/stores/data_style/mesh/cells/index.ts +122 -42
- package/internal/stores/data_style/mesh/cells/textures.ts +12 -6
- package/internal/stores/data_style/mesh/cells/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/cells/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/color.ts +12 -6
- package/internal/stores/data_style/mesh/edges/common.ts +14 -6
- package/internal/stores/data_style/mesh/edges/edge.ts +71 -39
- package/internal/stores/data_style/mesh/edges/index.ts +117 -42
- package/internal/stores/data_style/mesh/edges/vertex.ts +76 -39
- package/internal/stores/data_style/mesh/edges/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/width.ts +12 -4
- package/internal/stores/data_style/mesh/index.ts +30 -11
- package/internal/stores/data_style/mesh/points/color.ts +12 -6
- package/internal/stores/data_style/mesh/points/common.ts +21 -8
- package/internal/stores/data_style/mesh/points/index.ts +101 -50
- package/internal/stores/data_style/mesh/points/size.ts +12 -4
- package/internal/stores/data_style/mesh/points/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/points/visibility.ts +17 -7
- package/internal/stores/data_style/mesh/polygons/color.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/common.ts +23 -6
- package/internal/stores/data_style/mesh/polygons/index.ts +130 -70
- package/internal/stores/data_style/mesh/polygons/polygon.ts +77 -43
- package/internal/stores/data_style/mesh/polygons/textures.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polygons/visibility.ts +16 -6
- package/internal/stores/data_style/mesh/polyhedra/color.ts +12 -6
- package/internal/stores/data_style/mesh/polyhedra/common.ts +14 -6
- package/internal/stores/data_style/mesh/polyhedra/index.ts +115 -56
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +80 -39
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +16 -6
- package/internal/stores/data_style/model/blocks/color.ts +43 -13
- package/internal/stores/data_style/model/blocks/common.ts +21 -6
- package/internal/stores/data_style/model/blocks/index.ts +89 -59
- package/internal/stores/data_style/model/blocks/polyhedron.ts +101 -44
- package/internal/stores/data_style/model/blocks/vertex.ts +107 -42
- package/internal/stores/data_style/model/blocks/visibility.ts +17 -4
- package/internal/stores/data_style/model/color.ts +171 -83
- package/internal/stores/data_style/model/common.ts +70 -21
- package/internal/stores/data_style/model/corners/color.ts +43 -11
- package/internal/stores/data_style/model/corners/common.ts +25 -6
- package/internal/stores/data_style/model/corners/index.ts +66 -41
- package/internal/stores/data_style/model/corners/vertex.ts +105 -74
- package/internal/stores/data_style/model/corners/visibility.ts +19 -4
- package/internal/stores/data_style/model/edges/common.ts +12 -4
- package/internal/stores/data_style/model/edges/index.ts +2 -1
- package/internal/stores/data_style/model/edges/visibility.ts +24 -7
- package/internal/stores/data_style/model/index.ts +24 -11
- package/internal/stores/data_style/model/lines/color.ts +41 -11
- package/internal/stores/data_style/model/lines/common.ts +17 -6
- package/internal/stores/data_style/model/lines/edge.ts +105 -42
- package/internal/stores/data_style/model/lines/index.ts +86 -59
- package/internal/stores/data_style/model/lines/vertex.ts +105 -42
- package/internal/stores/data_style/model/lines/visibility.ts +17 -4
- package/internal/stores/data_style/model/points/common.ts +8 -4
- package/internal/stores/data_style/model/points/index.ts +10 -3
- package/internal/stores/data_style/model/points/size.ts +12 -4
- package/internal/stores/data_style/model/points/visibility.ts +16 -6
- package/internal/stores/data_style/model/selection.ts +80 -58
- package/internal/stores/data_style/model/surfaces/color.ts +41 -11
- package/internal/stores/data_style/model/surfaces/common.ts +23 -6
- package/internal/stores/data_style/model/surfaces/index.ts +89 -59
- package/internal/stores/data_style/model/surfaces/polygon.ts +107 -67
- package/internal/stores/data_style/model/surfaces/vertex.ts +111 -67
- package/internal/stores/data_style/model/surfaces/visibility.ts +18 -5
- package/internal/stores/data_style/model/visibility.ts +82 -20
- package/internal/stores/data_style/state.ts +77 -65
- package/internal/stores/hybrid_viewer/brightness.ts +49 -31
- package/internal/stores/hybrid_viewer/camera.ts +191 -177
- package/internal/stores/hybrid_viewer/camera_animation.ts +11 -10
- package/internal/stores/hybrid_viewer/core.ts +64 -0
- package/internal/stores/hybrid_viewer/filters.ts +10 -16
- package/internal/stores/hybrid_viewer/highlight.ts +91 -130
- package/internal/stores/hybrid_viewer/ruler.ts +24 -15
- package/internal/stores/hybrid_viewer/scene.ts +96 -117
- package/internal/stores/hybrid_viewer/viewport.ts +74 -65
- package/internal/stores/hybrid_viewer/vtk_types.ts +13 -29
- package/internal/utils/api_fetch.ts +54 -23
- package/internal/utils/upload_file.ts +74 -53
- package/internal/utils/viewer_call.ts +22 -13
- package/internal/utils/ws_client.ts +24 -13
- package/nuxt.config.ts +58 -1
- package/package.json +20 -8
- package/server/api/cloud/extensions/run.post.ts +6 -10
- package/server/api/local/app/project_folder_path.post.ts +4 -4
- package/server/api/local/app/run_back.post.ts +5 -7
- package/server/api/local/app/run_viewer.post.ts +5 -7
- package/server/api/local/extensions/kill.post.ts +4 -3
- package/server/api/local/extensions/run.post.ts +7 -10
- package/server/api/local/extensions/upload.put.ts +44 -54
- package/server/api/microservice/app/get_is_app_ready.get.ts +4 -5
- package/server/api/microservice/app/set_app_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_back_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_is_app_ready.post.ts +5 -6
- package/server/api/microservice/app/set_viewer_base_url.post.ts +5 -6
- package/server/api/microservice/extensions/download.post.ts +5 -4
- package/server/api/serverless/run_cloud.post.ts +53 -11
- package/server/utils/app_config.ts +29 -22
- package/server/utils/cleanup.ts +60 -30
- package/server/utils/cloud.ts +9 -8
- package/server/utils/extension.ts +23 -9
- package/server/utils/microservices.ts +33 -24
- package/server/utils/path.ts +4 -4
- package/server/utils/scripts.ts +26 -23
- package/server/utils/server.ts +2 -2
- package/server/utils/server_config.ts +41 -27
- package/server/utils/stream.ts +6 -0
- package/server/utils/ws_client.ts +42 -8
- package/shared/scripts.ts +15 -10
- package/shared/utils/call_raw.ts +23 -16
- package/shared/utils/call_schema.ts +5 -8
- package/shared/utils/fetch_raw.ts +87 -47
- package/shared/utils/fetch_schema.ts +6 -9
- package/shared/utils/file.ts +8 -2
- package/shared/utils/response_handlers/load.ts +26 -11
- package/shared/utils/types.ts +9 -9
- package/shared/utils/validate_schema.ts +1 -1
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +0 -276
- package/server/types/vendor.d.ts +0 -64
- package/server/utils/server_config.js +0 -43
- package/shared/utils/call_raw.js +0 -30
- package/shared/utils/fetch_raw.js +0 -40
- /package/{opengeodeweb_front_schemas.js → .build/opengeodeweb_front_schemas.js} +0 -0
- /package/{server → .build/server}/utils/server.js +0 -0
- /package/{shared → .build/shared}/app_mode.js +0 -0
- /package/{shared → .build/shared}/utils/parse_boolean.js +0 -0
- /package/{shared → .build/shared}/utils/types.js +0 -0
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
|
-
import type { Ref } from "vue";
|
|
5
2
|
import ActionButton from "@ogw_front/components/ActionButton.vue";
|
|
6
3
|
import CameraBookmarkIcon from "@ogw_front/assets/viewer_svgs/camera-bookmark.svg";
|
|
7
4
|
import CameraManager from "@ogw_front/components/CameraManager.vue";
|
|
@@ -18,15 +15,15 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
18
15
|
|
|
19
16
|
const hybridViewerStore = useHybridViewerStore();
|
|
20
17
|
const viewerStore = useViewerStore();
|
|
21
|
-
const showScreenshot = ref(false);
|
|
22
|
-
const showCameraManager = ref(false);
|
|
23
|
-
const showCameraOrientation = ref(false);
|
|
24
|
-
const showZScaling = ref(false);
|
|
25
|
-
const showClippingPlanes = ref(false);
|
|
26
|
-
const showShrinkFilter = ref(false);
|
|
27
|
-
const showRuler = ref(false);
|
|
28
|
-
const gridScale = ref(false);
|
|
29
|
-
const zScale = ref(hybridViewerStore.zScale);
|
|
18
|
+
const showScreenshot = ref<boolean>(false);
|
|
19
|
+
const showCameraManager = ref<boolean>(false);
|
|
20
|
+
const showCameraOrientation = ref<boolean>(false);
|
|
21
|
+
const showZScaling = ref<boolean>(false);
|
|
22
|
+
const showClippingPlanes = ref<boolean>(false);
|
|
23
|
+
const showShrinkFilter = ref<boolean>(false);
|
|
24
|
+
const showRuler = ref<boolean>(false);
|
|
25
|
+
const gridScale = ref<boolean>(false);
|
|
26
|
+
const zScale = ref<number>(hybridViewerStore.zScale);
|
|
30
27
|
const openSubMenus = ref<Record<string, boolean>>({});
|
|
31
28
|
|
|
32
29
|
interface CameraOptionAction {
|
|
@@ -47,7 +44,7 @@ watch(
|
|
|
47
44
|
},
|
|
48
45
|
);
|
|
49
46
|
|
|
50
|
-
async function handleZScalingClose() {
|
|
47
|
+
async function handleZScalingClose(): Promise<void> {
|
|
51
48
|
await hybridViewerStore.setZScaling(zScale.value);
|
|
52
49
|
showZScaling.value = false;
|
|
53
50
|
}
|
|
@@ -61,7 +58,7 @@ onKeyStroke("Escape", () => {
|
|
|
61
58
|
}
|
|
62
59
|
});
|
|
63
60
|
|
|
64
|
-
function closeAllToolsExcept(toolRef: Ref<boolean>) {
|
|
61
|
+
function closeAllToolsExcept(toolRef: Ref<boolean>): void {
|
|
65
62
|
const tools = [
|
|
66
63
|
showCameraOrientation,
|
|
67
64
|
showCameraManager,
|
|
@@ -78,7 +75,7 @@ function closeAllToolsExcept(toolRef: Ref<boolean>) {
|
|
|
78
75
|
}
|
|
79
76
|
}
|
|
80
77
|
|
|
81
|
-
function toggleTool(toolRef: Ref<boolean>) {
|
|
78
|
+
function toggleTool(toolRef: Ref<boolean>): void {
|
|
82
79
|
closeAllToolsExcept(toolRef);
|
|
83
80
|
toolRef.value = !toolRef.value;
|
|
84
81
|
}
|
|
@@ -88,7 +85,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
88
85
|
testId: "resetCameraButton",
|
|
89
86
|
tooltip: "Reset camera",
|
|
90
87
|
icon: "mdi-cube-scan",
|
|
91
|
-
action: () => {
|
|
88
|
+
action: (): void => {
|
|
92
89
|
hybridViewerStore.resetCamera();
|
|
93
90
|
},
|
|
94
91
|
},
|
|
@@ -97,7 +94,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
97
94
|
tooltip: "Center on click",
|
|
98
95
|
icon: "mdi-crosshairs-question",
|
|
99
96
|
color: hybridViewerStore.is_picking ? "primary" : undefined,
|
|
100
|
-
action: () => {
|
|
97
|
+
action: (): void => {
|
|
101
98
|
hybridViewerStore.is_picking = !hybridViewerStore.is_picking;
|
|
102
99
|
},
|
|
103
100
|
},
|
|
@@ -107,7 +104,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
107
104
|
icon: "mdi-cursor-default-click",
|
|
108
105
|
color: hybridViewerStore.is_hover_highlight ? "primary" : undefined,
|
|
109
106
|
action: hybridViewerStore.is_hover_highlight
|
|
110
|
-
? () => {
|
|
107
|
+
? (): void => {
|
|
111
108
|
hybridViewerStore.is_hover_highlight = false;
|
|
112
109
|
hybridViewerStore.clearHoverHighlight();
|
|
113
110
|
}
|
|
@@ -117,7 +114,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
117
114
|
title: "Cells",
|
|
118
115
|
testId: "highlightOnHoverCellsButton",
|
|
119
116
|
icon: "mdi-select-all",
|
|
120
|
-
action: () => {
|
|
117
|
+
action: (): void => {
|
|
121
118
|
if (
|
|
122
119
|
hybridViewerStore.is_hover_highlight &&
|
|
123
120
|
hybridViewerStore.hover_highlight_field_type === "CELL"
|
|
@@ -134,7 +131,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
134
131
|
title: "Points",
|
|
135
132
|
testId: "highlightOnHoverPointsButton",
|
|
136
133
|
icon: "mdi-select-drag",
|
|
137
|
-
action: () => {
|
|
134
|
+
action: (): void => {
|
|
138
135
|
if (
|
|
139
136
|
hybridViewerStore.is_hover_highlight &&
|
|
140
137
|
hybridViewerStore.hover_highlight_field_type === "POINT"
|
|
@@ -153,7 +150,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
153
150
|
testId: "cameraOrientationButton",
|
|
154
151
|
tooltip: "Camera orientation",
|
|
155
152
|
icon: "mdi-rotate-3d",
|
|
156
|
-
action: () => {
|
|
153
|
+
action: (): void => {
|
|
157
154
|
toggleTool(showCameraOrientation);
|
|
158
155
|
},
|
|
159
156
|
},
|
|
@@ -162,7 +159,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
162
159
|
tooltip: "Manage camera positions",
|
|
163
160
|
icon: CameraBookmarkIcon,
|
|
164
161
|
iconSize: 34,
|
|
165
|
-
action: () => {
|
|
162
|
+
action: (): void => {
|
|
166
163
|
toggleTool(showCameraManager);
|
|
167
164
|
},
|
|
168
165
|
},
|
|
@@ -170,7 +167,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
170
167
|
testId: "screenshotButton",
|
|
171
168
|
tooltip: "Take a screenshot",
|
|
172
169
|
icon: "mdi-camera",
|
|
173
|
-
action: () => {
|
|
170
|
+
action: (): void => {
|
|
174
171
|
toggleTool(showScreenshot);
|
|
175
172
|
},
|
|
176
173
|
},
|
|
@@ -179,7 +176,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
179
176
|
tooltip: "Toggle grid scale",
|
|
180
177
|
icon: "mdi-ruler-square",
|
|
181
178
|
color: gridScale.value ? "primary" : undefined,
|
|
182
|
-
action: () => {
|
|
179
|
+
action: (): void => {
|
|
183
180
|
const schema = schemas.opengeodeweb_viewer.viewer.grid_scale;
|
|
184
181
|
const params = { visibility: !gridScale.value };
|
|
185
182
|
viewerStore.request(
|
|
@@ -200,7 +197,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
200
197
|
testId: "zScalingButton",
|
|
201
198
|
tooltip: "Z Scaling Control",
|
|
202
199
|
icon: "mdi-sort",
|
|
203
|
-
action: () => {
|
|
200
|
+
action: (): void => {
|
|
204
201
|
toggleTool(showZScaling);
|
|
205
202
|
},
|
|
206
203
|
},
|
|
@@ -209,7 +206,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
209
206
|
tooltip: "Clipping Planes",
|
|
210
207
|
icon: "mdi-content-cut",
|
|
211
208
|
color: showClippingPlanes.value ? "primary" : undefined,
|
|
212
|
-
action: () => {
|
|
209
|
+
action: (): void => {
|
|
213
210
|
toggleTool(showClippingPlanes);
|
|
214
211
|
},
|
|
215
212
|
},
|
|
@@ -218,7 +215,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
218
215
|
tooltip: "Shrink Filter",
|
|
219
216
|
icon: "mdi-arrow-collapse-all",
|
|
220
217
|
color: showShrinkFilter.value ? "primary" : undefined,
|
|
221
|
-
action: () => {
|
|
218
|
+
action: (): void => {
|
|
222
219
|
toggleTool(showShrinkFilter);
|
|
223
220
|
},
|
|
224
221
|
},
|
|
@@ -227,7 +224,7 @@ const camera_options = computed<CameraOptionAction[]>(() => [
|
|
|
227
224
|
tooltip: "Ruler",
|
|
228
225
|
icon: "mdi-ruler",
|
|
229
226
|
color: showRuler.value ? "primary" : undefined,
|
|
230
|
-
action: () => {
|
|
227
|
+
action: (): void => {
|
|
231
228
|
toggleTool(showRuler);
|
|
232
229
|
},
|
|
233
230
|
},
|
|
@@ -9,10 +9,12 @@ interface Props {
|
|
|
9
9
|
|
|
10
10
|
const { isOverTreeview, isOverToolbar = false } = defineProps<Props>();
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
interface Emits {
|
|
13
13
|
drag: [event: MouseEvent];
|
|
14
14
|
click: [event: MouseEvent];
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits<Emits>();
|
|
16
18
|
|
|
17
19
|
const ADAPTIVE_BLUR_VAL = "15px";
|
|
18
20
|
const ADAPTIVE_OPACITY_VAL = 0.85;
|
|
@@ -51,14 +53,14 @@ let dragMoved = false;
|
|
|
51
53
|
let dragStartClientX = 0;
|
|
52
54
|
let dragStartClientY = 0;
|
|
53
55
|
|
|
54
|
-
function onMouseDown(event: MouseEvent) {
|
|
56
|
+
function onMouseDown(event: MouseEvent): void {
|
|
55
57
|
dragMoved = false;
|
|
56
58
|
dragStartClientX = event.clientX;
|
|
57
59
|
dragStartClientY = event.clientY;
|
|
58
60
|
emit("drag", event);
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
function onMouseUp(event: MouseEvent) {
|
|
63
|
+
function onMouseUp(event: MouseEvent): void {
|
|
62
64
|
const deltaX = event.clientX - dragStartClientX;
|
|
63
65
|
const deltaY = event.clientY - dragStartClientY;
|
|
64
66
|
if (Math.hypot(deltaX, deltaY) > dragThreshold) {
|
|
@@ -66,7 +68,7 @@ function onMouseUp(event: MouseEvent) {
|
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
function onCenterClick(event: MouseEvent) {
|
|
71
|
+
function onCenterClick(event: MouseEvent): void {
|
|
70
72
|
event.stopPropagation();
|
|
71
73
|
if (!dragMoved) {
|
|
72
74
|
emit("click", event);
|
|
@@ -22,7 +22,7 @@ const ANGLE_315 = 315;
|
|
|
22
22
|
|
|
23
23
|
const menuStore = useMenuStore();
|
|
24
24
|
|
|
25
|
-
function getItemStyle(index: number) {
|
|
25
|
+
function getItemStyle(index: number): Record<string, string> {
|
|
26
26
|
const angle = (index / menuItemCount) * 2 * Math.PI;
|
|
27
27
|
return {
|
|
28
28
|
transform: `translate(${Math.cos(angle) * RADIUS}px, ${Math.sin(angle) * RADIUS}px)`,
|
|
@@ -32,7 +32,7 @@ function getItemStyle(index: number) {
|
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
function getTooltipLocation(index: number) {
|
|
35
|
+
function getTooltipLocation(index: number): string {
|
|
36
36
|
const angle = (index / menuItemCount) * FULL_ANGLE;
|
|
37
37
|
if (angle < ANGLE_45 || angle >= ANGLE_315) {
|
|
38
38
|
return "right";
|
|
@@ -46,7 +46,7 @@ function getTooltipLocation(index: number) {
|
|
|
46
46
|
return "bottom";
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
function getTooltipOrigin(index: number) {
|
|
49
|
+
function getTooltipOrigin(index: number): string {
|
|
50
50
|
const angle = (index / menuItemCount) * FULL_ANGLE;
|
|
51
51
|
if (angle < ANGLE_45 || angle >= ANGLE_315) {
|
|
52
52
|
return "left";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
2
|
import CenterButton from "@ogw_front/components/Viewer/ContextMenu/CenterButton.vue";
|
|
5
3
|
import CircularItems from "@ogw_front/components/Viewer/ContextMenu/CircularItems.vue";
|
|
4
|
+
import type { Component } from "vue";
|
|
6
5
|
import InfoCard from "@ogw_front/components/Viewer/ContextMenu/InfoCard.vue";
|
|
7
6
|
import { useEventListener } from "@vueuse/core";
|
|
8
7
|
import { useMenuStore } from "@ogw_front/stores/menu";
|
|
9
8
|
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
10
|
-
import type { Component } from "vue";
|
|
11
9
|
|
|
12
10
|
interface Props {
|
|
13
11
|
id: string;
|
|
@@ -33,15 +31,20 @@ const treeviewStore = useTreeviewStore();
|
|
|
33
31
|
|
|
34
32
|
const meta_data = computed(() => menuStore.current_meta_data || {});
|
|
35
33
|
|
|
36
|
-
const show_menu = ref(true);
|
|
37
|
-
const showName = ref(false);
|
|
38
|
-
const isDragging = ref(false);
|
|
39
|
-
const dragStartX = ref(0);
|
|
40
|
-
const dragStartY = ref(0);
|
|
41
|
-
const menuX = ref(x);
|
|
42
|
-
const menuY = ref(y);
|
|
34
|
+
const show_menu = ref<boolean>(true);
|
|
35
|
+
const showName = ref<boolean>(false);
|
|
36
|
+
const isDragging = ref<boolean>(false);
|
|
37
|
+
const dragStartX = ref<number>(0);
|
|
38
|
+
const dragStartY = ref<number>(0);
|
|
39
|
+
const menuX = ref<number>(x);
|
|
40
|
+
const menuY = ref<number>(y);
|
|
41
|
+
|
|
42
|
+
interface Position {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
}
|
|
43
46
|
|
|
44
|
-
function clampPosition(posX: number, posY: number) {
|
|
47
|
+
function clampPosition(posX: number, posY: number): Position {
|
|
45
48
|
const margin = RADIUS + MARGIN_OFFSET;
|
|
46
49
|
return {
|
|
47
50
|
x: Math.min(Math.max(posX, margin), containerWidth - margin),
|
|
@@ -49,13 +52,13 @@ function clampPosition(posX: number, posY: number) {
|
|
|
49
52
|
};
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
function startDrag(event: MouseEvent) {
|
|
55
|
+
function startDrag(event: MouseEvent): void {
|
|
53
56
|
isDragging.value = true;
|
|
54
57
|
dragStartX.value = event.clientX - menuX.value;
|
|
55
58
|
dragStartY.value = event.clientY - menuY.value;
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
function handleDrag(event: MouseEvent) {
|
|
61
|
+
function handleDrag(event: MouseEvent): void {
|
|
59
62
|
const { x: clampedX, y: clampedY } = clampPosition(
|
|
60
63
|
event.clientX - dragStartX.value,
|
|
61
64
|
event.clientY - dragStartY.value,
|
|
@@ -65,7 +68,7 @@ function handleDrag(event: MouseEvent) {
|
|
|
65
68
|
menuStore.setMenuPosition(clampedX, clampedY);
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
function stopDrag(event: MouseEvent) {
|
|
71
|
+
function stopDrag(event: MouseEvent): void {
|
|
69
72
|
isDragging.value = false;
|
|
70
73
|
event.stopPropagation();
|
|
71
74
|
menuStore.setMenuPosition(menuX.value, menuY.value);
|
|
@@ -116,9 +119,9 @@ watch(
|
|
|
116
119
|
{ immediate: true },
|
|
117
120
|
);
|
|
118
121
|
|
|
119
|
-
const menuItemCount = computed(() => menu_items.value.length);
|
|
122
|
+
const menuItemCount = computed<number>(() => menu_items.value.length);
|
|
120
123
|
|
|
121
|
-
const isOverTreeview = computed(() => {
|
|
124
|
+
const isOverTreeview = computed<boolean>(() => {
|
|
122
125
|
const hasAdditional = treeviewStore.opened_views.some((view) => view.id !== "main");
|
|
123
126
|
const hasMain = treeviewStore.opened_views.some((view) => view.id === "main");
|
|
124
127
|
const firstColWidth = hasMain ? treeviewStore.panelWidth : 0;
|
|
@@ -132,7 +135,7 @@ const isOverTreeview = computed(() => {
|
|
|
132
135
|
return menuX.value < treeviewWidth;
|
|
133
136
|
});
|
|
134
137
|
|
|
135
|
-
const isOverToolbar = computed(() => {
|
|
138
|
+
const isOverToolbar = computed<boolean>(() => {
|
|
136
139
|
const toolbarEl = document.querySelector(".view-toolbar");
|
|
137
140
|
if (!toolbarEl) {
|
|
138
141
|
return false;
|
|
@@ -150,7 +153,7 @@ const isOverToolbar = computed(() => {
|
|
|
150
153
|
);
|
|
151
154
|
});
|
|
152
155
|
|
|
153
|
-
function getMenuStyle() {
|
|
156
|
+
function getMenuStyle(): Record<string, string> {
|
|
154
157
|
return {
|
|
155
158
|
position: "fixed" as const,
|
|
156
159
|
left: `${menuStore.containerLeft + menuX.value - RADIUS}px`,
|
|
@@ -158,7 +161,7 @@ function getMenuStyle() {
|
|
|
158
161
|
};
|
|
159
162
|
}
|
|
160
163
|
|
|
161
|
-
function toggleShowName() {
|
|
164
|
+
function toggleShowName(): void {
|
|
162
165
|
showName.value = !showName.value;
|
|
163
166
|
}
|
|
164
167
|
</script>
|
|
@@ -55,7 +55,7 @@ const TREEVIEW_MARGIN_RIGHT = 20;
|
|
|
55
55
|
const TREEVIEW_ICON_WIDTH = 48;
|
|
56
56
|
|
|
57
57
|
const treeviewStore = useTreeviewStore();
|
|
58
|
-
const isOverTreeview = computed(() => {
|
|
58
|
+
const isOverTreeview = computed<boolean>(() => {
|
|
59
59
|
const hasAdditional = treeviewStore.opened_views.some((view) => view.id !== "main");
|
|
60
60
|
const hasMain = treeviewStore.opened_views.some((view) => view.id === "main");
|
|
61
61
|
const firstColWidth = hasMain ? treeviewStore.panelWidth : 0;
|
|
@@ -69,7 +69,7 @@ const isOverTreeview = computed(() => {
|
|
|
69
69
|
return buttonCoords.value.x < treeviewWidth;
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
const isOverToolbar = computed(() => {
|
|
72
|
+
const isOverToolbar = computed<boolean>(() => {
|
|
73
73
|
const toolbarEl = document.querySelector(".view-toolbar");
|
|
74
74
|
if (!toolbarEl) {
|
|
75
75
|
return false;
|
|
@@ -84,7 +84,7 @@ const isOverToolbar = computed(() => {
|
|
|
84
84
|
);
|
|
85
85
|
});
|
|
86
86
|
|
|
87
|
-
const computedItemStyles = computed(() => {
|
|
87
|
+
const computedItemStyles = computed<Record<string, string>>(() => {
|
|
88
88
|
if (isOverTreeview.value || isOverToolbar.value) {
|
|
89
89
|
return {
|
|
90
90
|
"--adaptive-blur": "15px",
|
|
@@ -95,13 +95,15 @@ const computedItemStyles = computed(() => {
|
|
|
95
95
|
return adaptiveStyles.value;
|
|
96
96
|
});
|
|
97
97
|
|
|
98
|
-
const is_active = computed(() => menuStore.active_item_index === index);
|
|
98
|
+
const is_active = computed<boolean>(() => menuStore.active_item_index === index);
|
|
99
99
|
const optionsRef = ref<HTMLElement | undefined>(undefined);
|
|
100
100
|
const { height: optionsHeight } = useElementSize(optionsRef);
|
|
101
101
|
|
|
102
|
-
const maxCardHeight = computed(() =>
|
|
102
|
+
const maxCardHeight = computed<number>(() =>
|
|
103
|
+
Math.min(CARD_HEIGHT, menuStore.containerHeight - OFFSET),
|
|
104
|
+
);
|
|
103
105
|
|
|
104
|
-
const optionsStyle = computed(() => {
|
|
106
|
+
const optionsStyle = computed<Record<string, string>>(() => {
|
|
105
107
|
if (!is_active.value || !optionsHeight.value) {
|
|
106
108
|
return {};
|
|
107
109
|
}
|
|
@@ -120,7 +122,7 @@ const optionsStyle = computed(() => {
|
|
|
120
122
|
return { top: `calc(50% + ${offsetY}px)` };
|
|
121
123
|
});
|
|
122
124
|
|
|
123
|
-
const optionsClass = computed(() => {
|
|
125
|
+
const optionsClass = computed<string>(() => {
|
|
124
126
|
const loc = itemProps.tooltip_location;
|
|
125
127
|
const margin = MARGIN;
|
|
126
128
|
const radius = RADIUS;
|
|
@@ -132,7 +134,7 @@ const optionsClass = computed(() => {
|
|
|
132
134
|
return menuStore.menuX - radius - margin - CARD_WIDTH < 0 ? "options-right" : "options-left";
|
|
133
135
|
});
|
|
134
136
|
|
|
135
|
-
function toggleOptions() {
|
|
137
|
+
function toggleOptions(): void {
|
|
136
138
|
menuStore.toggleItemOptions(index);
|
|
137
139
|
}
|
|
138
140
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
3
|
import { middleTruncate } from "@ogw_front/utils/string";
|
|
4
|
-
import {
|
|
4
|
+
import { useCopyToClipboard } from "@ogw_front/composables/copy_to_clipboard";
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
6
6
|
import { useMenuStore } from "@ogw_front/stores/menu";
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
show: boolean;
|
|
10
|
-
//
|
|
10
|
+
// oxlint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
11
|
metaData: Record<string, any>;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -17,7 +17,6 @@ const emit = defineEmits<{
|
|
|
17
17
|
"update:show": [value: boolean];
|
|
18
18
|
}>();
|
|
19
19
|
|
|
20
|
-
const COPIED_TIMEOUT = 1500;
|
|
21
20
|
const MAX_SHORT_ID_LENGTH = 15;
|
|
22
21
|
const ID_SLICE_START = 8;
|
|
23
22
|
const ID_SLICE_END_OFFSET = 7;
|
|
@@ -25,10 +24,10 @@ const TRUNCATE_MAX_LENGTH = 22;
|
|
|
25
24
|
const TRUNCATE_START_CHARS = 12;
|
|
26
25
|
const TRUNCATE_END_CHARS = 7;
|
|
27
26
|
|
|
28
|
-
const { copy, copied } =
|
|
27
|
+
const { copy, copied } = useCopyToClipboard();
|
|
29
28
|
const copiedId = ref("");
|
|
30
29
|
|
|
31
|
-
function isCopied(id: string | undefined) {
|
|
30
|
+
function isCopied(id: string | undefined): boolean {
|
|
32
31
|
return copied.value && copiedId.value === id;
|
|
33
32
|
}
|
|
34
33
|
|
|
@@ -41,7 +40,7 @@ interface MeshComponentInfo {
|
|
|
41
40
|
category?: string;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
const componentName = ref("");
|
|
43
|
+
const componentName = ref<string>("");
|
|
45
44
|
const componentItem = ref<MeshComponentInfo | undefined>(undefined);
|
|
46
45
|
|
|
47
46
|
function asString(value: unknown): string | undefined {
|
|
@@ -72,7 +71,7 @@ watch(
|
|
|
72
71
|
{ immediate: true },
|
|
73
72
|
);
|
|
74
73
|
|
|
75
|
-
const cleanName = computed(() => {
|
|
74
|
+
const cleanName = computed<string>(() => {
|
|
76
75
|
const meta = menuStore.current_meta_data;
|
|
77
76
|
if (!meta) {
|
|
78
77
|
return "Unnamed Object";
|
|
@@ -83,7 +82,7 @@ const cleanName = computed(() => {
|
|
|
83
82
|
return asString(meta.name) ?? "Unnamed Object";
|
|
84
83
|
});
|
|
85
84
|
|
|
86
|
-
const displayTitle = computed(() => {
|
|
85
|
+
const displayTitle = computed<string>(() => {
|
|
87
86
|
const name = cleanName.value;
|
|
88
87
|
if (!name) {
|
|
89
88
|
return "";
|
|
@@ -91,7 +90,7 @@ const displayTitle = computed(() => {
|
|
|
91
90
|
return middleTruncate(name, TRUNCATE_MAX_LENGTH, TRUNCATE_START_CHARS, TRUNCATE_END_CHARS);
|
|
92
91
|
});
|
|
93
92
|
|
|
94
|
-
const displayComponentTitle = computed(() => {
|
|
93
|
+
const displayComponentTitle = computed<string>(() => {
|
|
95
94
|
if (!componentItem.value) {
|
|
96
95
|
return "";
|
|
97
96
|
}
|
|
@@ -103,7 +102,7 @@ const displayComponentTitle = computed(() => {
|
|
|
103
102
|
);
|
|
104
103
|
});
|
|
105
104
|
|
|
106
|
-
async function copyId(targetId: string | undefined) {
|
|
105
|
+
async function copyId(targetId: string | undefined): Promise<void> {
|
|
107
106
|
if (!targetId) {
|
|
108
107
|
return;
|
|
109
108
|
}
|
|
@@ -115,7 +114,7 @@ async function copyId(targetId: string | undefined) {
|
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
function formatId(id: string | undefined) {
|
|
117
|
+
function formatId(id: string | undefined): string {
|
|
119
118
|
if (!id) {
|
|
120
119
|
return "";
|
|
121
120
|
}
|
|
@@ -125,7 +124,7 @@ function formatId(id: string | undefined) {
|
|
|
125
124
|
return `${id.slice(0, ID_SLICE_START)}...${id.slice(id.length - ID_SLICE_END_OFFSET)}`;
|
|
126
125
|
}
|
|
127
126
|
|
|
128
|
-
const formattedId = computed(() => formatId(metaData.id));
|
|
127
|
+
const formattedId = computed<string>(() => formatId(metaData.id));
|
|
129
128
|
</script>
|
|
130
129
|
|
|
131
130
|
<template>
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
3
|
-
// oxlint-disable eslint/sort-imports
|
|
4
|
-
import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
|
|
5
|
-
// oxlint-disable import/consistent-type-specifier-style -- combining the default import with the type import avoids a duplicate-imports violation on this same module; using disable-next-line here is fragile because a formatter can re-wrap the import onto multiple lines and shift the flagged line
|
|
6
2
|
import ViewerContextMenuItem, {
|
|
7
3
|
type ItemProps,
|
|
8
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
|
|
6
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
9
7
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
10
8
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
11
9
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
12
|
-
|
|
13
10
|
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
14
11
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
15
12
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
16
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
17
13
|
|
|
18
14
|
const dataStyleStore = useDataStyleStore();
|
|
19
15
|
const hybridViewerStore = useHybridViewerStore();
|
|
@@ -27,7 +23,7 @@ const { itemProps } = defineProps<Props>();
|
|
|
27
23
|
|
|
28
24
|
const id = toRef(() => itemProps.id);
|
|
29
25
|
|
|
30
|
-
const visibility = computed({
|
|
26
|
+
const visibility = computed<boolean>({
|
|
31
27
|
get: () => dataStyleStore.meshEdgesVisibility(id.value),
|
|
32
28
|
set: async (newValue) => {
|
|
33
29
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -36,7 +32,7 @@ const visibility = computed({
|
|
|
36
32
|
hybridViewerStore.remoteRender();
|
|
37
33
|
},
|
|
38
34
|
});
|
|
39
|
-
const width = computed({
|
|
35
|
+
const width = computed<number>({
|
|
40
36
|
get: () => dataStyleStore.meshEdgesWidth(id.value),
|
|
41
37
|
set: async (newValue) => {
|
|
42
38
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -45,7 +41,7 @@ const width = computed({
|
|
|
45
41
|
hybridViewerStore.remoteRender();
|
|
46
42
|
},
|
|
47
43
|
});
|
|
48
|
-
const coloring_style_key = computed({
|
|
44
|
+
const coloring_style_key = computed<string>({
|
|
49
45
|
get: () => dataStyleStore.meshEdgesActiveColoring(id.value),
|
|
50
46
|
set: async (newValue) => {
|
|
51
47
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -63,7 +59,7 @@ const color = computed<RGBAColor | undefined>({
|
|
|
63
59
|
hybridViewerStore.remoteRender();
|
|
64
60
|
},
|
|
65
61
|
});
|
|
66
|
-
const vertex_attribute_name = computed({
|
|
62
|
+
const vertex_attribute_name = computed<string | undefined>({
|
|
67
63
|
get: () => dataStyleStore.meshEdgesVertexAttributeName(id.value),
|
|
68
64
|
set: async (newValue) => {
|
|
69
65
|
if (newValue === undefined) {
|
|
@@ -75,7 +71,7 @@ const vertex_attribute_name = computed({
|
|
|
75
71
|
hybridViewerStore.remoteRender();
|
|
76
72
|
},
|
|
77
73
|
});
|
|
78
|
-
const vertex_attribute_item = computed({
|
|
74
|
+
const vertex_attribute_item = computed<string | undefined>({
|
|
79
75
|
get: () => dataStyleStore.meshEdgesVertexAttributeItem(id.value),
|
|
80
76
|
set: async (newValue) => {
|
|
81
77
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -84,7 +80,7 @@ const vertex_attribute_item = computed({
|
|
|
84
80
|
hybridViewerStore.remoteRender();
|
|
85
81
|
},
|
|
86
82
|
});
|
|
87
|
-
const vertex_attribute_range = computed({
|
|
83
|
+
const vertex_attribute_range = computed<[number, number] | undefined>({
|
|
88
84
|
get: () => dataStyleStore.meshEdgesVertexAttributeRange(id.value),
|
|
89
85
|
set: async (newValue) => {
|
|
90
86
|
const [minimum, maximum] = newValue;
|
|
@@ -97,7 +93,7 @@ const vertex_attribute_range = computed({
|
|
|
97
93
|
hybridViewerStore.remoteRender();
|
|
98
94
|
},
|
|
99
95
|
});
|
|
100
|
-
const vertex_attribute_color_map = computed({
|
|
96
|
+
const vertex_attribute_color_map = computed<Map<string, RGBAColor>>({
|
|
101
97
|
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(id.value),
|
|
102
98
|
set: async (newValue) => {
|
|
103
99
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -115,7 +111,7 @@ const vertex_attribute_no_data_color = computed<RGBAColor | undefined>({
|
|
|
115
111
|
hybridViewerStore.remoteRender();
|
|
116
112
|
},
|
|
117
113
|
});
|
|
118
|
-
const edge_attribute_name = computed({
|
|
114
|
+
const edge_attribute_name = computed<string | undefined>({
|
|
119
115
|
get: () => dataStyleStore.meshEdgesEdgeAttributeName(id.value),
|
|
120
116
|
set: async (newValue) => {
|
|
121
117
|
if (newValue === undefined) {
|
|
@@ -127,7 +123,7 @@ const edge_attribute_name = computed({
|
|
|
127
123
|
hybridViewerStore.remoteRender();
|
|
128
124
|
},
|
|
129
125
|
});
|
|
130
|
-
const edge_attribute_item = computed({
|
|
126
|
+
const edge_attribute_item = computed<string | undefined>({
|
|
131
127
|
get: () => dataStyleStore.meshEdgesEdgeAttributeItem(id.value),
|
|
132
128
|
set: async (newValue) => {
|
|
133
129
|
await applyBatchStyle(id.value, (targetId: string) =>
|
|
@@ -136,7 +132,7 @@ const edge_attribute_item = computed({
|
|
|
136
132
|
hybridViewerStore.remoteRender();
|
|
137
133
|
},
|
|
138
134
|
});
|
|
139
|
-
const edge_attribute_range = computed({
|
|
135
|
+
const edge_attribute_range = computed<[number, number] | undefined>({
|
|
140
136
|
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(id.value),
|
|
141
137
|
set: async (newValue) => {
|
|
142
138
|
const [minimum, maximum] = newValue;
|
|
@@ -149,7 +145,7 @@ const edge_attribute_range = computed({
|
|
|
149
145
|
hybridViewerStore.remoteRender();
|
|
150
146
|
},
|
|
151
147
|
});
|
|
152
|
-
const edge_attribute_color_map = computed({
|
|
148
|
+
const edge_attribute_color_map = computed<Map<string, RGBAColor>>({
|
|
153
149
|
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(id.value),
|
|
154
150
|
set: async (newValue) => {
|
|
155
151
|
await applyBatchStyle(id.value, (targetId: string) =>
|