Skip to content

Commit 9b2e77b

Browse files
committed
fix(volumeColoring): watching a non-ref object
1 parent 3c79e69 commit 9b2e77b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/VolumeRendering.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default defineComponent({
135135
if (!animationRequested) {
136136
animationRequested = true;
137137
viewAnimationStore.requestAnimation(pwfWidget, {
138-
byViewType: ['3D'],
138+
byViewType: [TARGET_VIEW_ID],
139139
});
140140
}
141141
};

src/composables/useVolumeColoringInitializer.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export function useVolumeColoringInitializer(
1515

1616
const { imageData } = useImage(imageId);
1717

18-
watchImmediate([coloringConfig, viewId, imageId], () => {
18+
const viewIdRef = computed(() => unref(viewId));
19+
const imageIdRef = computed(() => unref(imageId));
20+
watchImmediate([coloringConfig, viewIdRef, imageIdRef], () => {
1921
if (coloringConfig.value) return;
2022

2123
const viewIdVal = unref(viewId);

0 commit comments

Comments
 (0)