Skip to content
Merged
2 changes: 2 additions & 0 deletions app/components/Viewer/ContextMenu/ContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import CenterButton from "@ogw_front/components/Viewer/ContextMenu/CenterButton.
import CircularItems from "@ogw_front/components/Viewer/ContextMenu/CircularItems.vue";
import type { Component } from "vue";
import InfoCard from "@ogw_front/components/Viewer/ContextMenu/InfoCard.vue";
import { provideBatchGroup } from "@ogw_front/composables/batch_style";
import { useEventListener } from "@vueuse/core";
import { useMenuStore } from "@ogw_front/stores/menu";
import { useTreeviewStore } from "@ogw_front/stores/treeview";
Expand Down Expand Up @@ -30,6 +31,7 @@ const menuStore = useMenuStore();
const treeviewStore = useTreeviewStore();

const meta_data = computed(() => menuStore.current_meta_data || {});
provideBatchGroup(() => meta_data.value.targetIds ?? []);

const show_menu = ref<boolean>(true);
const showName = ref<boolean>(false);
Expand Down
22 changes: 21 additions & 1 deletion app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
Expand All @@ -7,7 +12,6 @@ import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -166,6 +170,20 @@ const edge_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshEdgesVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}

async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshEdgesEdgeAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand All @@ -188,11 +206,13 @@ const edge_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:edge_attribute_name="edge_attribute_name"
v-model:edge_attribute_item="edge_attribute_item"
v-model:edge_attribute_range="edge_attribute_range"
@edge_attribute_ranges_per_data="setEdgeAttributeRangesPerData"
v-model:edge_attribute_color_map="edge_attribute_color_map"
v-model:edge_attribute_no_data_color="edge_attribute_no_data_color"
/>
Expand Down
22 changes: 21 additions & 1 deletion app/components/Viewer/Generic/Mesh/CellsOptions.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -175,6 +179,20 @@ const cell_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshCellsVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}

async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshCellsCellAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand All @@ -197,11 +215,13 @@ const cell_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:cell_attribute_name="cell_attribute_name"
v-model:cell_attribute_item="cell_attribute_item"
v-model:cell_attribute_range="cell_attribute_range"
@cell_attribute_ranges_per_data="setCellAttributeRangesPerData"
v-model:cell_attribute_color_map="cell_attribute_color_map"
v-model:cell_attribute_no_data_color="cell_attribute_no_data_color"
/>
Expand Down
22 changes: 21 additions & 1 deletion app/components/Viewer/Generic/Mesh/EdgesOptions.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -167,6 +171,20 @@ const edge_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshEdgesVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}

async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshEdgesEdgeAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand Down Expand Up @@ -196,11 +214,13 @@ const edge_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:edge_attribute_name="edge_attribute_name"
v-model:edge_attribute_item="edge_attribute_item"
v-model:edge_attribute_range="edge_attribute_range"
@edge_attribute_ranges_per_data="setEdgeAttributeRangesPerData"
v-model:edge_attribute_color_map="edge_attribute_color_map"
v-model:edge_attribute_no_data_color="edge_attribute_no_data_color"
/>
Expand Down
14 changes: 13 additions & 1 deletion app/components/Viewer/Generic/Mesh/PointsOptions.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -115,6 +119,13 @@ const vertex_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshPointsVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand Down Expand Up @@ -144,6 +155,7 @@ const vertex_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
:capabilities="{ vertex: { available: false } }"
Expand Down
22 changes: 21 additions & 1 deletion app/components/Viewer/Generic/Mesh/PolygonsOptions.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -190,6 +194,20 @@ const polygon_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}

async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshPolygonsPolygonAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand All @@ -215,11 +233,13 @@ const polygon_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:polygon_attribute_name="polygon_attribute_name"
v-model:polygon_attribute_item="polygon_attribute_item"
v-model:polygon_attribute_range="polygon_attribute_range"
@polygon_attribute_ranges_per_data="setPolygonAttributeRangesPerData"
v-model:polygon_attribute_color_map="polygon_attribute_color_map"
v-model:polygon_attribute_no_data_color="polygon_attribute_no_data_color"
:capabilities="capabilities"
Expand Down
22 changes: 21 additions & 1 deletion app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<script setup lang="ts">
import {
type RangesPerData,
applyRangesPerData,
useBatchStyle,
} from "@ogw_front/composables/batch_style";
import ViewerContextMenuItem, {
type ItemProps,
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
import { useBatchStyle } from "@ogw_front/composables/batch_style";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

Expand Down Expand Up @@ -163,6 +167,20 @@ const polyhedron_attribute_no_data_color = computed<RGBAColor>({
hybridViewerStore.remoteRender();
},
});

async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshPolyhedraVertexAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}

async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
await applyRangesPerData(ranges, (targetId, minimum, maximum) =>
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(targetId, minimum, maximum),
);
hybridViewerStore.remoteRender();
}
</script>

<template>
Expand All @@ -187,11 +205,13 @@ const polyhedron_attribute_no_data_color = computed<RGBAColor>({
v-model:vertex_attribute_name="vertex_attribute_name"
v-model:vertex_attribute_item="vertex_attribute_item"
v-model:vertex_attribute_range="vertex_attribute_range"
@vertex_attribute_ranges_per_data="setVertexAttributeRangesPerData"
v-model:vertex_attribute_color_map="vertex_attribute_color_map"
v-model:vertex_attribute_no_data_color="vertex_attribute_no_data_color"
v-model:polyhedron_attribute_name="polyhedron_attribute_name"
v-model:polyhedron_attribute_item="polyhedron_attribute_item"
v-model:polyhedron_attribute_range="polyhedron_attribute_range"
@polyhedron_attribute_ranges_per_data="setPolyhedronAttributeRangesPerData"
v-model:polyhedron_attribute_color_map="polyhedron_attribute_color_map"
v-model:polyhedron_attribute_no_data_color="polyhedron_attribute_no_data_color"
:capabilities="{
Expand Down
Loading
Loading