Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
9009774
feat(scenes): add scene scope and useSceneId
MaxNumerique Nov 30, 2026
0f8d9bc
feat(scenes): add scene link helpers
MaxNumerique Nov 30, 2026
691b184
feat(scenes): create and close scenes
MaxNumerique Nov 30, 2026
49ad372
feat(scenes): add and remove data per scene
MaxNumerique Nov 30, 2026
2ca5810
feat(scenes): export and import scenes state
MaxNumerique Nov 30, 2026
0010d88
fix(scenes): require a source scene to duplicate
MaxNumerique Nov 30, 2026
70b890f
fix(scenes): reject unknown scene ids
MaxNumerique Nov 30, 2026
d996afa
fix(scenes): ignore removal of data a scene does not show
MaxNumerique Nov 30, 2026
75693fd
feat(database): key style tables by scene
MaxNumerique Nov 30, 2026
2412482
feat(data_style): scope shared style state by scene
MaxNumerique Nov 30, 2026
52ceb50
feat(data_style): scope mesh styles by scene
MaxNumerique Nov 30, 2026
90edda5
feat(data_style): scope model styles by scene
MaxNumerique Nov 30, 2026
e9761fe
feat(data_style): scope image and scene styles by scene
MaxNumerique Nov 30, 2026
7c1cae9
feat(data_style): one data style store per scene
MaxNumerique Nov 30, 2026
f52b242
feat(data_style): import styles under the importing scene
MaxNumerique Nov 30, 2026
d9d1a70
feat(data_style): delete scene styles on close
MaxNumerique Nov 30, 2026
ffe83f7
fix(data_style): test scene style deletion on close
MaxNumerique Nov 30, 2026
fe4656d
feat(hybrid_viewer): scope core and camera slices by scene
MaxNumerique Nov 30, 2026
dc6430f
feat(hybrid_viewer): scope highlight, zoom box and ruler by scene
MaxNumerique Nov 30, 2026
ed27d7a
feat(hybrid_viewer): scope filters and brightness by scene
MaxNumerique Nov 30, 2026
c095f39
feat(hybrid_viewer): resize and render the scene's own view
MaxNumerique Nov 30, 2026
e79064e
feat(hybrid_viewer): one viewer store per scene
MaxNumerique Nov 30, 2026
205855c
feat(hybrid_viewer): stream each scene's own view
MaxNumerique Nov 30, 2026
054d066
feat(scenes): link cameras between scenes
MaxNumerique Nov 30, 2026
4a50912
feat(data_style): use the scene's hybrid viewer
MaxNumerique Nov 30, 2026
747c155
feat(scenes): render every scene showing a filtered data
MaxNumerique Nov 30, 2026
b44ea8a
feat(viewer): create the first scene once connected
MaxNumerique Nov 30, 2026
25e95b2
Apply prepare changes
MaxNumerique Nov 30, 2026
c4ffd78
fix(hybrid_viewer): release the view of a closed scene
MaxNumerique Nov 30, 2026
33abbc2
fix(scenes): define each scene store once
MaxNumerique Nov 30, 2026
50b4a04
fix(scenes): propagate the z-scaling to a scene not shown yet
MaxNumerique Nov 30, 2026
6dc7b3a
fix(scenes): move the camera propagation out of the scenes store
MaxNumerique Nov 30, 2026
84a98b3
fix(scenes): give every new scene the app colors and marker
MaxNumerique Nov 30, 2026
2269ab5
fix(viewer): start over from scene_1 on each connection
MaxNumerique Nov 30, 2026
edb1d14
Merge branch 'feat/multi_scenes' of https://github.com/Geode-solution…
MaxNumerique Nov 30, 2026
de757ca
feat(treeview): one tree view store per scene
MaxNumerique Nov 30, 2026
5985dc8
feat(scenes): keep the config row of the other scenes when one closes
MaxNumerique Nov 30, 2026
4fcc71a
feat(scenes): move import state to the scenes store
MaxNumerique Nov 30, 2026
cd306e5
feat(import): import a data into a given scene
MaxNumerique Nov 30, 2026
f2bf483
feat(project): export every scene's stores
MaxNumerique Nov 30, 2026
3f071ab
feat(project): reset every scene on project reset
MaxNumerique Nov 30, 2026
f5faa8d
feat(project): restore several scenes
MaxNumerique Nov 30, 2026
13516e3
feat(project): open a single-scene project as scene_1
MaxNumerique Nov 30, 2026
5980d36
fix(scenes): drop the per-scene data removal
MaxNumerique Dec 1, 2026
81039b8
fix(import): render every scene showing the imported data
MaxNumerique Dec 1, 2026
48ec020
feat(scenes): add scene view and title bar
MaxNumerique Dec 1, 2026
ebea82d
feat(scenes): lay out scenes and add one from the plus menu
MaxNumerique Dec 1, 2026
2dbdc25
fix(scenes): lint the scene layout test
MaxNumerique Dec 1, 2026
b3ff17a
feat(viewer): pass the scene to viewer components
MaxNumerique Dec 1, 2026
8b86a95
feat(data_style): pass the scene to style components
MaxNumerique Dec 1, 2026
79f774b
feat(treeview): pass the scene to tree view components
MaxNumerique Dec 1, 2026
7dd1c7c
feat(screenshot): capture a given scene
MaxNumerique Dec 1, 2026
ce0dd66
fix(viewer): keep the orientation marker per scene
MaxNumerique Dec 1, 2026
4b482a2
fix(import): reload a data in every scene showing it
MaxNumerique Dec 1, 2026
2b26ece
fix(basemap): follow every scene with the basemap
MaxNumerique Dec 1, 2026
4480c2b
fix(explode): follow the explosion in every scene showing the data
MaxNumerique Dec 1, 2026
e8d3cbb
feat(scenes): add a multi-scene e2e spec
MaxNumerique Dec 1, 2026
916a088
fix(scenes): lint the scene components
MaxNumerique Dec 1, 2026
d4d8588
fix(crs): mount the CRS tools once and align in one scene
MaxNumerique Dec 1, 2026
a530c7d
fix(explode): skip the scenes without a viewer and list the scenes once
MaxNumerique Dec 1, 2026
a8567ea
fix(scenes): forget the state of a closed scene
MaxNumerique Dec 1, 2026
f1b42d4
fix(scenes): await the project import in the camera and project tests
MaxNumerique Dec 1, 2026
1b32f2d
fix(scenes): resize each scene's remote view with its panel
MaxNumerique Dec 1, 2026
09d20c0
fix(scenes): turn the scene camera outside the tree view
MaxNumerique Dec 1, 2026
1c34c05
fix(scenes): cover a camera dragged by hand in a linked scene
MaxNumerique Dec 1, 2026
441da5b
fix(viewer): report camera sync errors instead of ignoring them
MaxNumerique Dec 1, 2026
4285ffe
fix(scenes): add the multi-scene e2e references
MaxNumerique Dec 1, 2026
fa9d0b2
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
MaxNumerique Dec 1, 2026
ec30252
Apply prepare changes
MaxNumerique Dec 1, 2026
74300ae
fix(scenes): add blank lines and return type required by oxlint 1.96
MaxNumerique Dec 1, 2026
ac2c595
fix(scenes): send the scene in the integration tests
MaxNumerique Dec 1, 2026
62bd26e
Apply prepare changes
MaxNumerique Dec 1, 2026
b16a771
fix(scenes): put a reloaded data back in the scenes showing it
MaxNumerique Dec 1, 2026
546d6d1
fix(scenes): name a new scene after the lowest free number
MaxNumerique Dec 1, 2026
22c6ac0
feat(scenes): replace the scene title bar with a floating overlay
MaxNumerique Dec 1, 2026
42fc79f
feat(scenes): center the scene overlay at the top of a wide scene
MaxNumerique Dec 1, 2026
022d56d
feat(scenes): add a scene from the view toolbar and name it in a thin…
MaxNumerique Dec 1, 2026
4b33a23
feat(scenes): keep the scene overlay next to the view toolbar
MaxNumerique Dec 1, 2026
35abb14
feat(scenes): drop the empty scene mode
MaxNumerique Dec 1, 2026
5c3819c
fix(scenes): copy the camera of a duplicated scene before it is shown
MaxNumerique Dec 1, 2026
372496f
fix(scenes): move the linked scenes live with the camera of a scene
MaxNumerique Dec 1, 2026
43f7586
fix(scenes): stop the interactor of a closed scene before releasing i…
MaxNumerique Dec 1, 2026
6acd179
fix(scenes): sync the scenes that followed a scene closed during a move
MaxNumerique Dec 1, 2026
6238bbb
fix(scenes): filter a data in its own scene only
MaxNumerique Dec 2, 2026
25f0fbc
fix(scenes): list only the data of its scene in the filter panels
MaxNumerique Dec 2, 2026
bf7c4b5
fix(scenes): drop from the filter panel selection the data that left …
MaxNumerique Dec 2, 2026
450732c
feat(model): rename the model component viewer_id into block_id
MaxNumerique Dec 2, 2026
955b26c
feat(scenes): rename the scene id, its types and the viewer RPCs into…
MaxNumerique Dec 2, 2026
15c2989
feat(scenes): rename the multi-view stores into viewers
MaxNumerique Dec 2, 2026
d300b50
feat(scenes): rename the scene components and test ids into viewers
MaxNumerique Dec 2, 2026
46800df
feat(scenes): rename the multi-view test helpers, suites and specs in…
MaxNumerique Dec 2, 2026
74490a2
fix(scenes): drop the doubled viewer wording
MaxNumerique Dec 2, 2026
0f42739
fix(scenes): release a closed viewer's interactor after its render wi…
MaxNumerique Dec 2, 2026
449654a
feat(scenes): let the app style the gap and the corners of the viewers
MaxNumerique Dec 2, 2026
db6f780
fix(basemap): show the detail of a basemap in the viewer that asked f…
MaxNumerique Dec 2, 2026
9b89194
feat(scenes): import a data into every viewer
MaxNumerique Dec 2, 2026
a034ebf
feat(scenes): link viewers on the camera only
MaxNumerique Dec 2, 2026
5535480
feat(scenes): remove the last used viewer
MaxNumerique Dec 2, 2026
7062f84
fix(scenes): leave the links of a closing viewer before deleting it
MaxNumerique Dec 2, 2026
65d58e1
feat(scenes): sync neighbouring viewers from the bridges between them
MaxNumerique Dec 3, 2026
d70cd2a
feat(scenes): choose the viewers layout and sync every camera from th…
MaxNumerique Dec 3, 2026
da67ec0
feat(scenes): scroll the view toolbar of a short viewer
MaxNumerique Dec 3, 2026
6afe344
feat(project): save the camera positions in projects
MaxNumerique Dec 3, 2026
7cbec73
feat(scenes): keep the tools of a viewer when it is duplicated and in…
MaxNumerique Dec 3, 2026
80bdf12
feat(scenes): run an app action in every viewer
MaxNumerique Dec 3, 2026
f689af9
feat(basemap): smaller attribution text
MaxNumerique Dec 3, 2026
874f721
feat(scenes): hide a viewer behind a loader until it is ready
MaxNumerique Dec 3, 2026
8fd86dd
fix(scenes): drive the multi-viewer browser tests through the layout …
MaxNumerique Dec 3, 2026
8c0076e
fix(scenes): show the layout switcher in the multi-viewer browser tes…
MaxNumerique Dec 3, 2026
6484141
fix(scenes): replace the multi-scene browser references by the multi-…
MaxNumerique Dec 3, 2026
db18573
fix(data_style): update the edged curve item references
MaxNumerique Dec 3, 2026
9966fe1
Merge remote-tracking branch 'origin/next' into feat/multi_scenes
MaxNumerique Dec 3, 2026
714cbdc
fix(scenes): stop passing a class the viewer UI cannot inherit
MaxNumerique Dec 3, 2026
b971c4d
fix(scenes): fix the test lint errors of oxlint 1.96
MaxNumerique Dec 3, 2026
1bdea8a
Apply prepare changes
MaxNumerique Dec 3, 2026
d747cf3
fix(tests): temporarily log the microservices output in browser tests
MaxNumerique Dec 3, 2026
9afac90
fix(scenes): stop the resize of a viewer closed meanwhile
MaxNumerique Dec 3, 2026
db3e07e
fix(viewers): list a data in a viewer once the viewer holds it
MaxNumerique Dec 3, 2026
9850017
trigger
MaxNumerique Dec 3, 2026
aec5f01
fix(viewers): drop the state of a closed viewer's stores
MaxNumerique Dec 3, 2026
41861d8
fix(treeview): keep the panel widths until the viewer is measured
MaxNumerique Dec 3, 2026
3801185
fix(viewer): show the picking chip outside a CRS alignment
MaxNumerique Dec 3, 2026
3bbb621
trigger
MaxNumerique Dec 3, 2026
19934fb
fix(viewers): close the viewers before the viewer drops them
MaxNumerique Dec 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion app/components/BasemapAttribution.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ const basemapStore = useBasemapStore();
<span
v-if="basemapStore.attribution && basemapStore.maps.length > 0"
data-testid="basemapAttribution"
class="basemap-attribution text-caption text-medium-emphasis px-1"
class="basemap-attribution text-medium-emphasis px-1"
>
{{ basemapStore.attribution }}
</span>
</template>

<style scoped>
/* The licences of the basemaps (ODbL, CC BY, Etalab) ask for a visible and legible credit, with no size: 10px
Stays legible, like the credits of web maps, on a background that keeps its contrast over the map */
.basemap-attribution {
font-size: 10px;
line-height: 1.4;
position: absolute;
left: 8px;
bottom: 4px;
Expand Down
6 changes: 4 additions & 2 deletions app/components/CameraManager/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import type { CameraPositionId, CameraPositionName } from "@ogw_internal/database/types";
import { useCameraManagerStore } from "@ogw_front/stores/camera_manager";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
import { useViewerId } from "@ogw_front/composables/viewer_id";

const cameraManagerStore = useCameraManagerStore();
const hybridViewerStore = useHybridViewerStore();
const viewerId = useViewerId();
const hybridViewerStore = useHybridViewerStore(viewerId);

const savedPositions = cameraManagerStore.refAllCameraPositions();

Expand All @@ -17,7 +19,7 @@ async function restorePosition(positionId: CameraPositionId): void {
if (hybridViewerStore.genericRenderWindow) {
hybridViewerStore.setCamera(position.camera_options);
} else {
await cameraManagerStore.restoreCameraPosition(positionId);
await cameraManagerStore.restoreCameraPosition(viewerId, positionId);
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion app/components/CameraManager/Saver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types.js";
import { useCameraManagerStore } from "@ogw_front/stores/camera_manager";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
import { useViewerId } from "@ogw_front/composables/viewer_id";

const cameraManagerStore = useCameraManagerStore();
const hybridViewerStore = useHybridViewerStore();
const viewerId = useViewerId();
const hybridViewerStore = useHybridViewerStore(viewerId);

const newPositionName = ref<string>("");

Expand Down
12 changes: 8 additions & 4 deletions app/components/CameraOrientation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ import {
cameraOrientations,
isNorth,
} from "@ogw_front/utils/camera_orientations";
import {
type CameraOrientationKey,
applyCameraOptions,
} from "@ogw_internal/stores/hybrid_viewer/camera_helpers";
import type { CssColor, Pixels } from "@ogw_front/types/ui";
import { BRAND_ORANGE } from "@ogw_front/utils/brand_colors";
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types.js";
import CameraOrientationDial from "@ogw_front/components/CameraOrientationDial.vue";
import type { CameraOrientationKey } from "@ogw_internal/stores/hybrid_viewer/camera_helpers";
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
import { applyCameraOptions } from "@ogw_internal/stores/hybrid_viewer/camera";
import { orientationCubeStyle } from "@ogw_front/utils/orientation_cube_style";
import { useChromeTheme } from "@ogw_front/composables/chrome_theme";
import { useDataStyleStore } from "@ogw_front/stores/data_style";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
import { useTheme } from "vuetify";
import { useViewerId } from "@ogw_front/composables/viewer_id";
import { newInstance as vtkAnnotatedCubeActor } from "@kitware/vtk.js/Rendering/Core/AnnotatedCubeActor";
import { newInstance as vtkGenericRenderWindow } from "@kitware/vtk.js/Rendering/Misc/GenericRenderWindow";

Expand All @@ -36,7 +39,8 @@ const emit = defineEmits<Emits>();
const show = defineModel<boolean>("show", { default: false });

// With the compass marker, the orientations read north, east, south, west, up and down
const dataStyleStore = useDataStyleStore();
const viewerId = useViewerId();
const dataStyleStore = useDataStyleStore(viewerId);
const isCompass = computed(() => dataStyleStore.sceneStyle.orientation_widget === "compass");
const orientations = computed(() =>
cameraOrientations(dataStyleStore.sceneStyle.orientation_widget),
Expand All @@ -53,7 +57,7 @@ const cubeStyle = computed(() => {
});

const hoveredFace = ref<string | undefined>(undefined);
const hybridViewerStore = useHybridViewerStore();
const hybridViewerStore = useHybridViewerStore(viewerId);
const cubeContainer = useTemplateRef("cubeContainer");

let genericRenderWindow: unknown = undefined;
Expand Down
120 changes: 35 additions & 85 deletions app/components/ClippingPlanes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,43 @@ import {
DEBOUNCE_DELAY,
DEFAULT_NORMALS,
createClippingPlane,
getPlaneRgbaColor,
} from "@ogw_front/utils/clipping_planes";
import ClippingPlaneCard from "@ogw_front/components/ClippingPlaneCard.vue";
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
import type { DatasetOption } from "@ogw_front/types/props/components_tools";
import SliceCard from "@ogw_front/components/SliceCard.vue";
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
import { areAllGrids } from "@ogw_front/utils/slice";
import { useClippingPlanesWidget } from "@ogw_front/composables/clipping_planes_widget";
import { useClippingSlices } from "@ogw_front/composables/clipping_slices";
import { useDataStore } from "@ogw_front/stores/data";
import { useDebounceFn } from "@vueuse/core";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
import { useViewerId } from "@ogw_front/composables/viewer_id";
import { viewerItems } from "@ogw_front/composables/viewer_items";

interface Props {
escapeFunction: () => void;
}
const { escapeFunction } = defineProps<Props>();

const show = defineModel<boolean>("show", { default: false });
const dataStore = useDataStore();
const hybridViewerStore = useHybridViewerStore();
const targetAllVisible = ref<boolean>(true);
const selectedDatasetIds = ref<DataId[]>([]);
let lastItemId = 0;
function newItemId(): ClippingPlane["id"] {
lastItemId += 1;
return lastItemId;
}
const viewerId = useViewerId();
const hybridViewerStore = useHybridViewerStore(viewerId);
// The state of the tool is the one of the viewer: a duplicated viewer and a saved project keep it
const { targetAllVisible, selectedDatasetIds, planes, sliceEnabled, slices } = toRefs(
hybridViewerStore.clippingFilter,
);
function createPlane(origin: ClippingPlane["origin"], normal: number[]): ClippingPlane {
return createClippingPlane(newItemId(), origin, normal);
return createClippingPlane(hybridViewerStore.newClippingItemId(), origin, normal);
}
const planes = ref<ClippingPlane[]>([createPlane(undefined, [1, 0, 0])]);
const allItems = computed(() => dataStore.registeredItems);
const targetIds = computed<DataId[]>(() => {
if (targetAllVisible.value) {
return allItems.value.map((item) => item.data_id);
}
return selectedDatasetIds.value;
const allItems = computed(() => viewerItems(viewerId, useDataStore().registeredItems));
const allIds = computed<DataId[]>(() => allItems.value.map((item) => item.data_id));
const targetIds = computed<DataId[]>(() =>
targetAllVisible.value ? allIds.value : selectedDatasetIds.value,
);
const isAllGrid = computed<boolean>(() => areAllGrids(allItems.value, targetIds.value));
const isSliceActive = computed<boolean>(() => isAllGrid.value && sliceEnabled.value);
watch(allIds, (shown) => {
selectedDatasetIds.value = selectedDatasetIds.value.filter((dataId) => shown.includes(dataId));
});
const availableDatasets = computed<DatasetOption[]>(() =>
allItems.value.map((item) => ({ title: item.name || item.data_id, value: item.data_id })),
Expand All @@ -70,58 +69,11 @@ const {
debouncedApply: (...args: unknown[]) => debouncedApply?.(...args),
});

function getUntargetedIds(): DataId[] {
return allItems.value
.map((item) => item.data_id)
.filter((dataId) => !targetIds.value.includes(dataId));
}

const {
sliceEnabled,
slices,
sliceMaxIndices,
isAllGrid,
isSliceActive,
applySlices,
addSlice,
removeSlice,
resetSlices,
removeSlices,
} = useClippingSlices({ allItems, targetIds, getUntargetedIds, newItemId, hybridViewerStore });

async function applyClippingPlanes(): Promise<void> {
if (allItems.value.length === 0) {
return;
}
const center = getSceneCenter();
const untargetedIds = getUntargetedIds();
const planesData = planes.value.map((plane, index) => ({
origin: (plane.origin || center).map(Number),
normal: plane.normal.map(Number),
color: getPlaneRgbaColor(index, plane.opacity),
}));
if (targetIds.value.length > 0) {
await hybridViewerStore.setClippingPlanes(
targetIds.value,
isSliceActive.value ? [] : planesData,
);
}
if (untargetedIds.length > 0) {
await hybridViewerStore.setClippingPlanes(untargetedIds, []);
}
}

async function applyAll(): Promise<void> {
await applyClippingPlanes();
await applySlices();
}

debouncedApply = useDebounceFn(() => applyClippingPlanes(), DEBOUNCE_DELAY);
const debouncedApplySlices = useDebounceFn(() => applySlices(), DEBOUNCE_DELAY);
debouncedApply = useDebounceFn(() => hybridViewerStore.applyClippingPlanes(), DEBOUNCE_DELAY);
const debouncedApplySlices = useDebounceFn(() => hybridViewerStore.applySlices(), DEBOUNCE_DELAY);

function addPlane(): void {
// Index is always in-bounds (modulo the fixed-size list); the fallbacks only
// Satisfy noUncheckedIndexedAccess and are never hit at runtime.
// In-bounds by the modulo: the fallbacks only satisfy noUncheckedIndexedAccess, never hit at runtime.
const normal = DEFAULT_NORMALS[planes.value.length % DEFAULT_NORMALS.length] ??
DEFAULT_NORMALS[0] ?? [1, 0, 0];
planes.value.push(createPlane([...getSceneCenter()], normal));
Expand All @@ -134,22 +86,20 @@ function removePlane(index: ClippingPlaneIndex): void {
function flipNormal(plane: ClippingPlane): void {
plane.normal = plane.normal.map((component) => -component);
syncWidgets();
applyClippingPlanes();
hybridViewerStore.applyClippingPlanes();
}

async function resetClippingPlanes(): Promise<void> {
setFromWidget(true);
planes.value = [createPlane(undefined, [1, 0, 0])];
resetSlices();
hybridViewerStore.resetSlices();
updateWidgetPlacement({ isReset: true });
setFromWidget(false);
await applyAll();
await hybridViewerStore.applyClippingFilter();
}

async function removeClippingPlanes(): Promise<void> {
const allIds = allItems.value.map((item) => item.data_id);
await hybridViewerStore.setClippingPlanes(allIds, []);
await removeSlices(allIds);
await hybridViewerStore.removeClippingFilter();
}

watch(widgetContainer, (container) => {
Expand All @@ -161,7 +111,7 @@ watch(widgetContainer, (container) => {
watch(
planes,
() => {
if (isFromWidget()) {
if (isFromWidget() || !show.value) {
return;
}
syncWidgets();
Expand All @@ -173,7 +123,7 @@ watch(
watch(show, (visible) => {
if (visible) {
updateWidgetPlacement({ isReset: true });
applyAll();
hybridViewerStore.applyClippingFilter();
}
});

Expand All @@ -182,15 +132,15 @@ watch(
() => {
if (show.value) {
updateWidgetPlacement({ isReset: true });
applyAll();
hybridViewerStore.applyClippingFilter();
}
},
{ deep: true },
);

watch(sliceEnabled, () => {
if (show.value) {
applyAll();
hybridViewerStore.applyClippingFilter();
}
});

Expand All @@ -207,7 +157,7 @@ watch(
watch(allItems, () => {
if (show.value) {
updateWidgetPlacement({ isReset: true });
applyAll();
hybridViewerStore.applyClippingFilter();
}
});

Expand All @@ -216,7 +166,7 @@ watch(
(actorCount) => {
if (show.value && actorCount > 0) {
updateWidgetPlacement({ isReset: true });
applyAll();
hybridViewerStore.applyClippingFilter();
}
},
);
Expand Down Expand Up @@ -290,7 +240,7 @@ onBeforeUnmount(cleanupLocalWidget);
variant="tonal"
color="primary"
icon="ph-plus"
@click="addSlice"
@click="hybridViewerStore.addSlice"
/>
</v-col>
</v-row>
Expand All @@ -299,8 +249,8 @@ onBeforeUnmount(cleanupLocalWidget);
:key="slice.id"
:slice="slice"
:index="idx"
:max-index="sliceMaxIndices[slice.axis]"
@remove="removeSlice(idx)"
:max-index="hybridViewerStore.sliceMaxIndices[slice.axis]"
@remove="hybridViewerStore.removeSlice(idx)"
/>
</template>
<v-divider class="my-2" />
Expand Down
9 changes: 8 additions & 1 deletion app/components/CrsAlign.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Count, Message } from "@ogw_front/types/ui";
import type { CRS } from "@geode/opengeodeweb-back/schema_types";
import CrsSelector from "@ogw_front/components/CrsSelector.vue";
import PickButton from "@ogw_front/components/PickButton.vue";
import type { ViewerId } from "@ogw_internal/stores/viewers/types";
import { useCrs } from "@ogw_front/composables/crs";
import { useCrsAlign } from "@ogw_front/composables/crs_align";
import { useCrsLinkCandidates } from "@ogw_front/composables/crs_link";
Expand All @@ -11,6 +12,12 @@ import { useCrsStore } from "@ogw_front/stores/crs";
import { useFeedbackStore } from "@ogw_front/stores/feedback";
import { useLiveDataItem } from "@ogw_front/composables/live_data_item";

interface Props {
viewerId: ViewerId;
}

const { viewerId } = defineProps<Props>();

const feedbackStore = useFeedbackStore();
const { alignCrs, followProject } = useCrs();
const crsStore = useCrsStore();
Expand All @@ -25,7 +32,7 @@ const {
toSourceCrsPoints,
toTargetCrsPoints,
editSourcePoint,
} = useCrsAlign();
} = useCrsAlign(viewerId);

const targetCrs = ref<CRS | undefined>(undefined);
const applying = ref(false);
Expand Down
19 changes: 7 additions & 12 deletions app/components/ExplodeFilter.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<script setup lang="ts">
import { EXPLODE_RANGE } from "@ogw_internal/stores/hybrid_viewer/filters_state";
import FactorFilterPanel from "@ogw_front/components/FactorFilterPanel.vue";
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";

const DEFAULT_EXPLODE_VALUE = 0.2;
const MIN_EXPLODE_VALUE = 0;
const MAX_EXPLODE_VALUE = 1;
import { useViewerId } from "@ogw_front/composables/viewer_id";

interface Props {
escapeFunction: () => void;
}
const { escapeFunction } = defineProps<Props>();

const show = defineModel<boolean>("show", { default: false });
const hybridViewerStore = useHybridViewerStore();
const viewerId = useViewerId();
const hybridViewerStore = useHybridViewerStore(viewerId);
</script>

<template>
Expand All @@ -21,13 +20,9 @@ const hybridViewerStore = useHybridViewerStore();
title="Exploded View"
label="Explode Factor"
test-id-prefix="explode"
:set-factor="hybridViewerStore.setExplode"
:factor-range="{
min: MIN_EXPLODE_VALUE,
max: MAX_EXPLODE_VALUE,
defaultValue: DEFAULT_EXPLODE_VALUE,
neutralValue: MIN_EXPLODE_VALUE,
}"
:filter="hybridViewerStore.explodeFilter"
:apply-factor="hybridViewerStore.applyExplodeFilter"
:factor-range="EXPLODE_RANGE"
:escapeFunction="escapeFunction"
/>
</template>
Loading
Loading